aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/job-queue.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-09 13:21:18 +0200
committerChocobozzz <me@florianbigard.com>2022-08-09 13:21:18 +0200
commit51335c72cf1119a92901edeaa5c7dfc1feef3ca4 (patch)
tree024091083b237ade367b63af8c48c4d7e027fa62 /server/lib/job-queue/job-queue.ts
parente2b2c726b1c1c31794d324c3afd7c24e1f953131 (diff)
downloadPeerTube-51335c72cf1119a92901edeaa5c7dfc1feef3ca4.tar.gz
PeerTube-51335c72cf1119a92901edeaa5c7dfc1feef3ca4.tar.zst
PeerTube-51335c72cf1119a92901edeaa5c7dfc1feef3ca4.zip
Prevent job failure on concurrent HLS transcoding
Diffstat (limited to 'server/lib/job-queue/job-queue.ts')
-rw-r--r--server/lib/job-queue/job-queue.ts6
1 files changed, 1 insertions, 5 deletions
diff --git a/server/lib/job-queue/job-queue.ts b/server/lib/job-queue/job-queue.ts
index 14e3a00aa..281e2e51a 100644
--- a/server/lib/job-queue/job-queue.ts
+++ b/server/lib/job-queue/job-queue.ts
@@ -286,20 +286,16 @@ class JobQueue {
286 async pause () { 286 async pause () {
287 for (const handlerName of Object.keys(this.workers)) { 287 for (const handlerName of Object.keys(this.workers)) {
288 const worker: Worker = this.workers[handlerName] 288 const worker: Worker = this.workers[handlerName]
289 const queue: Queue = this.queues[handlerName]
290 289
291 await worker.pause() 290 await worker.pause()
292 await queue.pause()
293 } 291 }
294 } 292 }
295 293
296 async resume () { 294 resume () {
297 for (const handlerName of Object.keys(this.workers)) { 295 for (const handlerName of Object.keys(this.workers)) {
298 const worker: Worker = this.workers[handlerName] 296 const worker: Worker = this.workers[handlerName]
299 const queue: Queue = this.queues[handlerName]
300 297
301 worker.resume() 298 worker.resume()
302 await queue.resume()
303 } 299 }
304 } 300 }
305 301