diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-02-07 21:02:33 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-02-07 21:02:33 +0900 |
| commit | 5448c22031d66cc020323bf4c4d1701889a46485 (patch) | |
| tree | e14772d48d982c6a7d9cebeed497c16373e2e303 /src/queue | |
| parent | Fix #4179 (diff) | |
| download | sharkey-5448c22031d66cc020323bf4c4d1701889a46485.tar.gz sharkey-5448c22031d66cc020323bf4c4d1701889a46485.tar.bz2 sharkey-5448c22031d66cc020323bf4c4d1701889a46485.zip | |
Revert 96bc17aa1014983d5e6bf8b4c05d898156995a0d
Diffstat (limited to 'src/queue')
| -rw-r--r-- | src/queue/index.ts | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/queue/index.ts b/src/queue/index.ts index 28768bf38f..5d3baa8243 100644 --- a/src/queue/index.ts +++ b/src/queue/index.ts @@ -8,17 +8,17 @@ import handler from './processors'; import { queueLogger } from './logger'; const enableQueue = !program.disableQueue; -const queueAvailable = config.redis.isJust(); +const queueAvailable = config.redis != null; const queue = initializeQueue(); function initializeQueue() { - return config.redis.map(({ port, host, pass }) => { + if (queueAvailable) { return new Queue('misskey', { redis: { - port: port, - host: host, - password: pass.getOrElse(null) + port: config.redis.port, + host: config.redis.host, + password: config.redis.pass }, removeOnSuccess: true, @@ -27,7 +27,9 @@ function initializeQueue() { sendEvents: false, storeJobs: false }); - }).getOrElse(null); + } else { + return null; + } } export function deliver(user: ILocalUser, content: any, to: any) { |