Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

feat: check also waiting

Nevo David85d015f34920
diff --git a/apps/cron/src/tasks/check.missing.queues.ts b/apps/cron/src/tasks/check.missing.queues.ts
index c383ab6a3..6c9def7fc 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 3138a25cb..69105304b 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);