diff options
author | Chocobozzz <me@florianbigard.com> | 2022-01-14 15:06:33 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-01-14 15:06:33 +0100 |
commit | ff4d2c73fd5a8ab08a5a5c2655eb91c96d39687e (patch) | |
tree | 959bf789e55da372a709682317c95f895a742b5c | |
parent | 5cd0a3aeadd1cf667f748409f758ec224af6df01 (diff) | |
download | PeerTube-ff4d2c73fd5a8ab08a5a5c2655eb91c96d39687e.tar.gz PeerTube-ff4d2c73fd5a8ab08a5a5c2655eb91c96d39687e.tar.zst PeerTube-ff4d2c73fd5a8ab08a5a5c2655eb91c96d39687e.zip |
Fix bull redis options
-rw-r--r-- | server/lib/job-queue/job-queue.ts | 12 |
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' |
23 | import { logger } from '../../helpers/logger' | 23 | import { logger } from '../../helpers/logger' |
24 | import { JOB_ATTEMPTS, JOB_COMPLETED_LIFETIME, JOB_CONCURRENCY, JOB_TTL, REPEAT_JOBS, WEBSERVER } from '../../initializers/constants' | 24 | import { JOB_ATTEMPTS, JOB_COMPLETED_LIFETIME, JOB_CONCURRENCY, JOB_TTL, REPEAT_JOBS, WEBSERVER } from '../../initializers/constants' |
25 | import { Redis } from '../redis' | ||
26 | import { processActivityPubCleaner } from './handlers/activitypub-cleaner' | 25 | import { processActivityPubCleaner } from './handlers/activitypub-cleaner' |
27 | import { processActivityPubFollow } from './handlers/activitypub-follow' | 26 | import { processActivityPubFollow } from './handlers/activitypub-follow' |
28 | import { processActivityPubHttpBroadcast } from './handlers/activitypub-http-broadcast' | 27 | import { 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 | } |