diff --git a/apps/cron/src/tasks/check.missing.queues.ts b/apps/cron/src/tasks/check.missing.queues.ts index c383ab6a..6c9def7f 100644 --- a/apps/cron/src/tasks/check.missing.queues.ts +++ b/apps/cron/src/tasks/check.missing.queues.ts @@ -19,9 +19,11 @@ export class CheckMissingQueues { id: p.id, publishDate: p.publishDate, isJob: - (await this._workerServiceProducer - .getQueue('post') - .getJobState(p.id)) === 'delayed', + ['delayed', 'waiting'].indexOf( + await this._workerServiceProducer + .getQueue('post') + .getJobState(p.id) + ) > -1, })) ) ).filter((p) => !p.isJob); diff --git a/apps/cron/src/tasks/post.now.pending.queues.ts b/apps/cron/src/tasks/post.now.pending.queues.ts index 3138a25c..69105304 100644 --- a/apps/cron/src/tasks/post.now.pending.queues.ts +++ b/apps/cron/src/tasks/post.now.pending.queues.ts @@ -18,9 +18,11 @@ export class PostNowPendingQueues { id: p.id, publishDate: p.publishDate, isJob: - (await this._workerServiceProducer - .getQueue('post') - .getJobState(p.id)) === 'delayed', + ['delayed', 'waiting'].indexOf( + await this._workerServiceProducer + .getQueue('post') + .getJobState(p.id) + ) > -1, })) ) ).filter((p) => !p.isJob);