diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2018-05-14 17:51:15 +0200 |
---|---|---|
committer | Rigel Kent <par@rigelk.eu> | 2018-07-14 15:00:56 +0200 |
commit | 19f7b248d88805e6595b671a7447b0ba5e1451fa (patch) | |
tree | 2b58f538411c8f1d3cffaeef0e63758a7b0b050f /server/lib/job-queue | |
parent | 4503cb2a894d9fb2b838cab0a9af8b3923e18a56 (diff) | |
download | PeerTube-19f7b248d88805e6595b671a7447b0ba5e1451fa.tar.gz PeerTube-19f7b248d88805e6595b671a7447b0ba5e1451fa.tar.zst PeerTube-19f7b248d88805e6595b671a7447b0ba5e1451fa.zip |
adding redis unix connection
Diffstat (limited to 'server/lib/job-queue')
-rw-r--r-- | server/lib/job-queue/job-queue.ts | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/server/lib/job-queue/job-queue.ts b/server/lib/job-queue/job-queue.ts index 77aaa7fa8..1b46180e8 100644 --- a/server/lib/job-queue/job-queue.ts +++ b/server/lib/job-queue/job-queue.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import * as Bull from 'bull' | 1 | import * as Bull from 'bull' |
2 | import { JobState, JobType } from '../../../shared/models' | 2 | import { JobState, JobType } from '../../../shared/models' |
3 | import { logger } from '../../helpers/logger' | 3 | import { logger } from '../../helpers/logger' |
4 | import { Redis } from '../redis' | ||
4 | import { CONFIG, JOB_ATTEMPTS, JOB_COMPLETED_LIFETIME, JOB_CONCURRENCY, JOB_REQUEST_TTL } from '../../initializers' | 5 | import { CONFIG, JOB_ATTEMPTS, JOB_COMPLETED_LIFETIME, JOB_CONCURRENCY, JOB_REQUEST_TTL } from '../../initializers' |
5 | import { ActivitypubHttpBroadcastPayload, processActivityPubHttpBroadcast } from './handlers/activitypub-http-broadcast' | 6 | import { ActivitypubHttpBroadcastPayload, processActivityPubHttpBroadcast } from './handlers/activitypub-http-broadcast' |
6 | import { ActivitypubHttpFetcherPayload, processActivityPubHttpFetcher } from './handlers/activitypub-http-fetcher' | 7 | import { ActivitypubHttpFetcherPayload, processActivityPubHttpFetcher } from './handlers/activitypub-http-fetcher' |
@@ -63,12 +64,7 @@ class JobQueue { | |||
63 | this.jobRedisPrefix = 'bull-' + CONFIG.WEBSERVER.HOST | 64 | this.jobRedisPrefix = 'bull-' + CONFIG.WEBSERVER.HOST |
64 | const queueOptions = { | 65 | const queueOptions = { |
65 | prefix: this.jobRedisPrefix, | 66 | prefix: this.jobRedisPrefix, |
66 | redis: { | 67 | redis: Redis.getRedisClient() |
67 | host: CONFIG.REDIS.HOSTNAME, | ||
68 | port: CONFIG.REDIS.PORT, | ||
69 | auth: CONFIG.REDIS.AUTH, | ||
70 | db: CONFIG.REDIS.DB | ||
71 | } | ||
72 | } | 68 | } |
73 | 69 | ||
74 | for (const handlerName of Object.keys(handlers)) { | 70 | for (const handlerName of Object.keys(handlers)) { |