fix: return empty string when queue unavailable
Some checks failed
Deploy API Server / build-and-deploy (push) Has been cancelled

This commit is contained in:
WangDL 2026-05-23 19:47:55 +08:00
parent ad0e4f397a
commit 466acc7e83

View File

@ -24,7 +24,7 @@ export class EventBusService {
/** Async: persistent via BullMQ, retry + DLQ */
async publishAsync(event: BaseDomainEvent): Promise<string> {
if (!this.queue) return;
if (!this.queue) return '';
const job = await this.queue.add('domain-events', {
eventType: event.eventType,
eventId: event.eventId,