We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 12ff7e7 commit a458aeaCopy full SHA for a458aea
src/JobDbRepository.ts
@@ -84,7 +84,10 @@ export class JobDbRepository {
84
* Internal method to unlock jobs so that they can be re-run
85
*/
86
async unlockJobs(jobIds: ObjectId[]): Promise<void> {
87
- await this.collection.updateMany({ _id: { $in: jobIds } }, { $unset: { lockedAt: true } });
+ await this.collection.updateMany(
88
+ { _id: { $in: jobIds }, nextRunAt: { $ne: null } },
89
+ { $unset: { lockedAt: true } }
90
+ );
91
}
92
93
async lockJob(job: JobWithId): Promise<IJobParameters | undefined> {
0 commit comments