fix: 降低 Jenkins 同步空扫描审计噪音
- deploy-runs: 自动同步无候选、无同步结果、无失败时不再写入成功 tick 审计\n- 保留存在候选或异常时的 Jenkins 同步审计可观测性
This commit is contained in:
@@ -186,6 +186,14 @@ export class JenkinsSyncSchedulerService
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const summary = await this.deployRunsService.syncJenkinsRuns();
|
const summary = await this.deployRunsService.syncJenkinsRuns();
|
||||||
|
const hasObservableWork =
|
||||||
|
summary.totalCandidates > 0 ||
|
||||||
|
summary.syncedRuns.length > 0 ||
|
||||||
|
summary.failedRuns.length > 0;
|
||||||
|
|
||||||
|
if (!hasObservableWork) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
await this.auditService.record({
|
await this.auditService.record({
|
||||||
action: 'JENKINS_AUTO_SYNC_TICK_COMPLETED',
|
action: 'JENKINS_AUTO_SYNC_TICK_COMPLETED',
|
||||||
|
|||||||
Reference in New Issue
Block a user