diff options
Diffstat (limited to 'server/lib/job-queue/job-queue.ts')
-rw-r--r-- | server/lib/job-queue/job-queue.ts | 7 |
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 = | |||
96 | export type CreateJobOptions = { | 96 | export type CreateJobOptions = { |
97 | delay?: number | 97 | delay?: number |
98 | priority?: number | 98 | priority?: number |
99 | failParentOnFailure?: boolean | ||
99 | } | 100 | } |
100 | 101 | ||
101 | const handlers: { [id in JobType]: (job: Job) => Promise<any> } = { | 102 | const 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 | ||