fix: 降低通知 outbox 空扫描审计噪音

This commit is contained in:
湛兮
2026-06-12 04:00:04 +08:00
parent 3a1b0b65bd
commit e1ab0366f0
@@ -1,5 +1,6 @@
/**
* 通知 outbox 重试器复用当前 provider 投递边界,后续可迁移到 BullMQ worker
* 通知 outbox 重试器复用当前 provider 投递边界,并避免空扫描刷屏审计
* 后续迁移到 BullMQ 时保留“有候选才记录成功 tick”的可观测边界。
*/
import { Injectable, OnModuleDestroy, OnModuleInit } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
@@ -86,6 +87,10 @@ export class NotificationOutboxRetryService
}
}
if (messages.length === 0) {
return;
}
await this.auditService.record({
action: 'NOTIFICATION_OUTBOX_RETRY_TICK_COMPLETED',
resourceType: 'notification_outbox',