From 66165b193562f461330e36da8609fa7f71b465d1 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sun, 15 Dec 2019 03:34:11 +0900 Subject: Redis prefixにホスト名を使用するように (Resolve #5639) (#5640) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/load.ts | 2 ++ src/db/postgre.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/config/load.ts b/src/config/load.ts index efebb8bd03..eea9ed8561 100644 --- a/src/config/load.ts +++ b/src/config/load.ts @@ -43,6 +43,8 @@ export default function load() { if (config.autoAdmin == null) config.autoAdmin = false; + if (!config.redis.prefix) config.redis.prefix = mixin.host; + return Object.assign(config, mixin); } diff --git a/src/db/postgre.ts b/src/db/postgre.ts index 00476b8774..ad59e86508 100644 --- a/src/db/postgre.ts +++ b/src/db/postgre.ts @@ -155,7 +155,7 @@ export function initDb(justBorrow = false, sync = false, log = false) { host: config.redis.host, port: config.redis.port, password: config.redis.pass, - prefix: config.redis.prefix, + prefix: `${config.redis.prefix}:query:`, db: config.redis.db || 0 } } : false, -- cgit v1.3.1-freya