diff 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 | } |