From 8dc2c9d480bd98f10197a573cfc3f6c52fcdd24b Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 14 Mar 2022 16:50:01 +0000 Subject: [PATCH] Fixing an issue with detecting fully qualified Redis URL despite not in use. --- packages/backend-core/src/redis/utils.js | 2 +- packages/server/src/threads/query.js | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/backend-core/src/redis/utils.js b/packages/backend-core/src/redis/utils.js index 0d523d0b6b..4c2b2f5cae 100644 --- a/packages/backend-core/src/redis/utils.js +++ b/packages/backend-core/src/redis/utils.js @@ -40,7 +40,7 @@ exports.getRedisOptions = (clustered = false) => { let redisProtocolUrl // fully qualified redis URL - if (/rediss?/.test(REDIS_URL)) { + if (/rediss?:\/\//.test(REDIS_URL)) { redisProtocolUrl = REDIS_URL } diff --git a/packages/server/src/threads/query.js b/packages/server/src/threads/query.js index c547a10c74..3ce138b72f 100644 --- a/packages/server/src/threads/query.js +++ b/packages/server/src/threads/query.js @@ -51,9 +51,6 @@ class QueryRunner { } else { sql = sql.replace(binding, variable) } - // const indexOfBinding = sql.indexOf(binding) - // const constantStr = `'${binding}'` - // sql = sql.replace(sql.indexOf(constantStr) === indexOfBinding - 1 ? constantStr : binding, variable) } // replicate the knex structure fields.sql = sql