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.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/server/lib/job-queue/job-queue.ts b/server/lib/job-queue/job-queue.ts
index fbc599f12..22bd1f5d2 100644
--- a/server/lib/job-queue/job-queue.ts
+++ b/server/lib/job-queue/job-queue.ts
@@ -162,6 +162,18 @@ class JobQueue {
162 } 162 }
163 } 163 }
164 164
165 async pause () {
166 for (const handler of Object.keys(this.queues)) {
167 await this.queues[handler].pause(true)
168 }
169 }
170
171 async resume () {
172 for (const handler of Object.keys(this.queues)) {
173 await this.queues[handler].resume(true)
174 }
175 }
176
165 createJob (obj: CreateJobArgument, options: CreateJobOptions = {}): void { 177 createJob (obj: CreateJobArgument, options: CreateJobOptions = {}): void {
166 this.createJobWithPromise(obj, options) 178 this.createJobWithPromise(obj, options)
167 .catch(err => logger.error('Cannot create job.', { err, obj })) 179 .catch(err => logger.error('Cannot create job.', { err, obj }))