From cf0a71bad3c0396a61041f7be367f461b61d51f8 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 4 Feb 2019 13:37:50 +0900 Subject: [PATCH] Add --disable-queue option --- src/argv.ts | 1 + src/queue/index.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/argv.ts b/src/argv.ts index 53050fe79..02bd67bbc 100644 --- a/src/argv.ts +++ b/src/argv.ts @@ -5,6 +5,7 @@ program .version(pkg.version) .option('--no-daemons', 'Disable daemon processes (for debbuging)') .option('--disable-clustering', 'Disable clustering') + .option('--disable-queue', 'Disable job queue') .option('--quiet', 'Suppress all logs') .option('--verbose', 'Enable all logs') .option('--slow', 'Delay all requests (for debbuging)') diff --git a/src/queue/index.ts b/src/queue/index.ts index 5e5f9dae4..d1237435b 100644 --- a/src/queue/index.ts +++ b/src/queue/index.ts @@ -3,8 +3,9 @@ import config from '../config'; import http from './processors/http'; import { ILocalUser } from '../models/user'; import Logger from '../misc/logger'; +import { program } from '../argv'; -const enableQueue = config.redis != null; +const enableQueue = config.redis != null && !program.disableQueue; const queue = new Queue('misskey', { redis: {