chore: Make scheduled job tests less likely to fail (#8241)
This commit is contained in:
@@ -395,7 +395,14 @@ export class RedisDistributedTransactionStorage
|
||||
}
|
||||
|
||||
async remove(jobId: string): Promise<void> {
|
||||
await this.queue.removeRepeatableByKey(`${JobType.SCHEDULE}_${jobId}`)
|
||||
const repeatableJobs = await this.queue.getRepeatableJobs()
|
||||
const job = repeatableJobs.find(
|
||||
(job) => job.id === `${JobType.SCHEDULE}_${jobId}`
|
||||
)
|
||||
|
||||
if (job) {
|
||||
await this.queue.removeRepeatableByKey(job.key)
|
||||
}
|
||||
}
|
||||
|
||||
async removeAll(): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user