Skip to content

Commit 1b2268a

Browse files
committed
add public method to requeueJob
1 parent 242fe0b commit 1b2268a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Queue.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ export class Queue {
103103
async removeJob(job: RawJob) {
104104
return await this.jobStore.removeJob(job);
105105
}
106+
/**
107+
* @param job the job which should be requeued
108+
*/
109+
async requeueJob(job: RawJob) {
110+
return await this.jobStore.updateJob({ ...job, failed: '' });
111+
}
106112

107113
configure(options: QueueOptions) {
108114
const {

0 commit comments

Comments
 (0)