more stuff

This commit is contained in:
Boki 2026-10-20 20:11:40 -04:00
parent c3cb36c8d6
commit 7dec0be3b4
26 changed files with 1394 additions and 275 deletions

View file

@ -56,7 +56,8 @@ export class Queue {
// Initialize BullMQ queue
this.bullQueue = new BullQueue(queueName, {
connection,
// Publishing must fail promptly during outages; durable producers retain their intent.
connection: { ...connection, maxRetriesPerRequest: 1, enableOfflineQueue: false },
defaultJobOptions: {
removeOnComplete: 100,
removeOnFail: 100,
@ -68,6 +69,9 @@ export class Queue {
...defaultJobOptions,
},
});
this.bullQueue.on('error', error =>
this.logger.error('Queue connection error', { queueName, error })
);
// Initialize queue events if workers will be used
if (config.workers && config.workers > 0) {