Skip to content

Commit

Permalink
fix(redis): Do not use Redis connectionName to avoid calling CLIENT c…
Browse files Browse the repository at this point in the history
…ommand
  • Loading branch information
andris9 committed Oct 28, 2024
1 parent 7ab4b80 commit aafc732
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const redis = new Redis(REDIS_CONF);
module.exports.queueConf = {
connection: Object.assign(
{
connectionName: `${REDIS_CONF.connectionName}[notify]`
//connectionName: `${REDIS_CONF.connectionName}[notify]`
},
REDIS_CONF
),
Expand Down
8 changes: 4 additions & 4 deletions scan.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
const config = require('wild-config');
const Redis = require('ioredis');
const redisUrl = require('./lib/redis-url');
const packageData = require('./package.json');
const { threadId } = require('worker_threads');
//const packageData = require('./package.json');
//const { threadId } = require('worker_threads');
const { readEnvValue } = require('./lib/tools');

config.dbs = config.dbs || {
Expand All @@ -17,8 +17,8 @@ const redisConf = readEnvValue('EENGINE_REDIS') || readEnvValue('REDIS_URL') ||
const REDIS_CONF = Object.assign(
{
// some defaults
showFriendlyErrorStack: true,
connectionName: `${packageData.name}@${packageData.version}[${process.pid}${threadId ? `:${threadId}` : ''}][scan]`
showFriendlyErrorStack: true
//connectionName: `${packageData.name}@${packageData.version}[${process.pid}${threadId ? `:${threadId}` : ''}][scan]`
},
typeof redisConf === 'string' ? redisUrl(redisConf) : redisConf || {}
);
Expand Down

0 comments on commit aafc732

Please sign in to comment.