feat: check also waiting

This commit is contained in:
Nevo David 2025-08-09 00:07:46 +07:00
parent 00fd1512c5
commit 85d015f349
2 changed files with 10 additions and 6 deletions

View File

@ -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);

View File

@ -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);