aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/job-queue.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/job-queue/job-queue.ts')
-rw-r--r--server/lib/job-queue/job-queue.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/lib/job-queue/job-queue.ts b/server/lib/job-queue/job-queue.ts
index 21bf0f226..03f6fbea7 100644
--- a/server/lib/job-queue/job-queue.ts
+++ b/server/lib/job-queue/job-queue.ts
@@ -96,6 +96,7 @@ export type CreateJobArgument =
96export type CreateJobOptions = { 96export type CreateJobOptions = {
97 delay?: number 97 delay?: number
98 priority?: number 98 priority?: number
99 failParentOnFailure?: boolean
99} 100}
100 101
101const handlers: { [id in JobType]: (job: Job) => Promise<any> } = { 102const handlers: { [id in JobType]: (job: Job) => Promise<any> } = {
@@ -363,7 +364,11 @@ class JobQueue {
363 name: 'job', 364 name: 'job',
364 data: job.payload, 365 data: job.payload,
365 queueName: job.type, 366 queueName: job.type,
366 opts: this.buildJobOptions(job.type as JobType, pick(job, [ 'priority', 'delay' ])) 367 opts: {
368 failParentOnFailure: true,
369
370 ...this.buildJobOptions(job.type as JobType, pick(job, [ 'priority', 'delay', 'failParentOnFailure' ]))
371 }
367 } 372 }
368 } 373 }
369 374