fix: return empty string when queue unavailable
Some checks failed
Deploy API Server / build-and-deploy (push) Has been cancelled
Some checks failed
Deploy API Server / build-and-deploy (push) Has been cancelled
This commit is contained in:
parent
ad0e4f397a
commit
466acc7e83
@ -24,7 +24,7 @@ export class EventBusService {
|
|||||||
|
|
||||||
/** Async: persistent via BullMQ, retry + DLQ */
|
/** Async: persistent via BullMQ, retry + DLQ */
|
||||||
async publishAsync(event: BaseDomainEvent): Promise<string> {
|
async publishAsync(event: BaseDomainEvent): Promise<string> {
|
||||||
if (!this.queue) return;
|
if (!this.queue) return '';
|
||||||
const job = await this.queue.add('domain-events', {
|
const job = await this.queue.add('domain-events', {
|
||||||
eventType: event.eventType,
|
eventType: event.eventType,
|
||||||
eventId: event.eventId,
|
eventId: event.eventId,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user