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