Fix bull redis options
This commit is contained in:
parent
5cd0a3aead
commit
ff4d2c73fd
|
@ -22,7 +22,6 @@ import {
|
||||||
} from '../../../shared/models'
|
} from '../../../shared/models'
|
||||||
import { logger } from '../../helpers/logger'
|
import { logger } from '../../helpers/logger'
|
||||||
import { JOB_ATTEMPTS, JOB_COMPLETED_LIFETIME, JOB_CONCURRENCY, JOB_TTL, REPEAT_JOBS, WEBSERVER } from '../../initializers/constants'
|
import { JOB_ATTEMPTS, JOB_COMPLETED_LIFETIME, JOB_CONCURRENCY, JOB_TTL, REPEAT_JOBS, WEBSERVER } from '../../initializers/constants'
|
||||||
import { Redis } from '../redis'
|
|
||||||
import { processActivityPubCleaner } from './handlers/activitypub-cleaner'
|
import { processActivityPubCleaner } from './handlers/activitypub-cleaner'
|
||||||
import { processActivityPubFollow } from './handlers/activitypub-follow'
|
import { processActivityPubFollow } from './handlers/activitypub-follow'
|
||||||
import { processActivityPubHttpBroadcast } from './handlers/activitypub-http-broadcast'
|
import { processActivityPubHttpBroadcast } from './handlers/activitypub-http-broadcast'
|
||||||
|
@ -114,9 +113,16 @@ class JobQueue {
|
||||||
this.initialized = true
|
this.initialized = true
|
||||||
|
|
||||||
this.jobRedisPrefix = 'bull-' + WEBSERVER.HOST
|
this.jobRedisPrefix = 'bull-' + WEBSERVER.HOST
|
||||||
const queueOptions = {
|
|
||||||
|
const queueOptions: Bull.QueueOptions = {
|
||||||
prefix: this.jobRedisPrefix,
|
prefix: this.jobRedisPrefix,
|
||||||
redis: Redis.getRedisClientOptions(),
|
redis: {
|
||||||
|
password: CONFIG.REDIS.AUTH,
|
||||||
|
db: CONFIG.REDIS.DB,
|
||||||
|
host: CONFIG.REDIS.HOSTNAME,
|
||||||
|
port: CONFIG.REDIS.PORT,
|
||||||
|
path: CONFIG.REDIS.SOCKET
|
||||||
|
},
|
||||||
settings: {
|
settings: {
|
||||||
maxStalledCount: 10 // transcoding could be long, so jobs can often be interrupted by restarts
|
maxStalledCount: 10 // transcoding could be long, so jobs can often be interrupted by restarts
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue