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: [PATCH] =?UTF-8?q?Redis=20prefix=E3=81=AB=E3=83=9B=E3=82=B9?= =?UTF-8?q?=E3=83=88=E5=90=8D=E3=82=92=E4=BD=BF=E7=94=A8=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=20(Resolve=20#5639)=20(#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 efebb8bd0..eea9ed856 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 00476b877..ad59e8650 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,