aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-01-14 15:06:33 +0100
committerChocobozzz <me@florianbigard.com>2022-01-14 15:06:33 +0100
commitff4d2c73fd5a8ab08a5a5c2655eb91c96d39687e (patch)
tree959bf789e55da372a709682317c95f895a742b5c /server/lib/job-queue
parent5cd0a3aeadd1cf667f748409f758ec224af6df01 (diff)
downloadPeerTube-ff4d2c73fd5a8ab08a5a5c2655eb91c96d39687e.tar.gz
PeerTube-ff4d2c73fd5a8ab08a5a5c2655eb91c96d39687e.tar.zst
PeerTube-ff4d2c73fd5a8ab08a5a5c2655eb91c96d39687e.zip
Fix bull redis options
Diffstat (limited to 'server/lib/job-queue')
-rw-r--r--server/lib/job-queue/job-queue.ts12
1 files changed, 9 insertions, 3 deletions
diff --git a/server/lib/job-queue/job-queue.ts b/server/lib/job-queue/job-queue.ts
index 4c1597b33..fbc599f12 100644
--- a/server/lib/job-queue/job-queue.ts
+++ b/server/lib/job-queue/job-queue.ts
@@ -22,7 +22,6 @@ import {
22} from '../../../shared/models' 22} from '../../../shared/models'
23import { logger } from '../../helpers/logger' 23import { logger } from '../../helpers/logger'
24import { JOB_ATTEMPTS, JOB_COMPLETED_LIFETIME, JOB_CONCURRENCY, JOB_TTL, REPEAT_JOBS, WEBSERVER } from '../../initializers/constants' 24import { JOB_ATTEMPTS, JOB_COMPLETED_LIFETIME, JOB_CONCURRENCY, JOB_TTL, REPEAT_JOBS, WEBSERVER } from '../../initializers/constants'
25import { Redis } from '../redis'
26import { processActivityPubCleaner } from './handlers/activitypub-cleaner' 25import { processActivityPubCleaner } from './handlers/activitypub-cleaner'
27import { processActivityPubFollow } from './handlers/activitypub-follow' 26import { processActivityPubFollow } from './handlers/activitypub-follow'
28import { processActivityPubHttpBroadcast } from './handlers/activitypub-http-broadcast' 27import { processActivityPubHttpBroadcast } from './handlers/activitypub-http-broadcast'
@@ -114,9 +113,16 @@ class JobQueue {
114 this.initialized = true 113 this.initialized = true
115 114
116 this.jobRedisPrefix = 'bull-' + WEBSERVER.HOST 115 this.jobRedisPrefix = 'bull-' + WEBSERVER.HOST
117 const queueOptions = { 116
117 const queueOptions: Bull.QueueOptions = {
118 prefix: this.jobRedisPrefix, 118 prefix: this.jobRedisPrefix,
119 redis: Redis.getRedisClientOptions(), 119 redis: {
120 password: CONFIG.REDIS.AUTH,
121 db: CONFIG.REDIS.DB,
122 host: CONFIG.REDIS.HOSTNAME,
123 port: CONFIG.REDIS.PORT,
124 path: CONFIG.REDIS.SOCKET
125 },
120 settings: { 126 settings: {
121 maxStalledCount: 10 // transcoding could be long, so jobs can often be interrupted by restarts 127 maxStalledCount: 10 // transcoding could be long, so jobs can often be interrupted by restarts
122 } 128 }