We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0acec0 commit 9438c8cCopy full SHA for 9438c8c
src/api.js
@@ -285,7 +285,7 @@ export class Api {
285
})
286
}
287
tasks.length > 0 && logWorker('Accepted tasks ', { tasks })
288
- await this.redis.expire(this.workerSetName, 60 * 5)
+ if (this.redis.isOpen) await this.redis.expire(this.workerSetName, 60 * 5)
289
let reclaimCounts = 0
290
await promise.all(tasks.map(async task => {
291
const streamlen = await this.redis.xLen(task.stream)
@@ -385,6 +385,7 @@ export class Worker {
385
386
387
async checkAndRecoverOrphanStreams () {
388
+ if (!this.client.redis.isOpen) return
389
const rawConsumers = await this.client.redis.xInfoConsumers(
390
this.client.redisWorkerStreamName,
391
this.client.redisWorkerGroupName
0 commit comments