I just saw in the release notes that the latest Pro version marks QueueSchedulerPro as obsolete:
Remove QueueSchedulerPro class. WorkerPro class should handle QueueSchedulerPro functionalities.
Is there anything to consider, or can we just replace QueueSchedulerPro by QueueScheudler without any further changes? Or can we even completely skip the scheduler creation?
Here's my current setup:
// workers need persistent connections with endless retries, queues
// can (and should) fail faster to prevent clients being blocked indefinitely
const endlessRetryConnection = new Redis(this.config.redisUri, {
maxRetriesPerRequest: null,
enableReadyCheck: false,
retryStrategy: (times: number) => Math.min(Math.exp(times), 15000),
});
const limitedRetryConnection = new Redis(this.config.redisUri, {
maxRetriesPerRequest: 20,
enableReadyCheck: false,
retryStrategy: (times: number) => Math.min(Math.exp(times), 15000),
});
const queue = new QueuePro<T>(queueName, { connection: limitedRetryConnection });
const scheduler = new QueueSchedulerPro(queueName, { connection: endlessRetryConnection });
const worker = new WorkerPro(queueName, async (job: Job) => {
// no try/catch needed - we're listening on the failed event of the worker
await callback(job.data, job);
}, {
connection: endlessRetryConnection,
group: {
// force jobs of the same group to execute sequentially
concurrency: 1,
},
concurrency: 10, // bull default is 1
});
I just saw in the release notes that the latest Pro version marks
QueueSchedulerPro
as obsolete:Is there anything to consider, or can we just replace
QueueSchedulerPro
byQueueScheudler
without any further changes? Or can we even completely skip the scheduler creation?Here's my current setup:
Thanks for your advice :)