Skip to content

Commit

Permalink
feat: remove node password and db validate on cluster mode
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangjianye1 committed Apr 7, 2024
1 parent 4edf3a0 commit 0650488
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/redis.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ function createClient(config, app) {
assert(config.nodes && config.nodes.length !== 0, '[egg-redis] cluster nodes configuration is required when use cluster redis');

config.nodes.forEach(client => {
assert(client.host && client.port && client.password !== undefined && client.db !== undefined,
`[egg-redis] 'host: ${client.host}', 'port: ${client.port}', 'password: ${client.password}', 'db: ${client.db}' are required on config`);
assert(client.host && client.port, `[egg-redis] 'host: ${client.host}', 'port: ${client.port}' are required on config`);
});
app.coreLogger.info('[egg-redis] cluster connecting');
client = new Redis.Cluster(config.nodes, config);
Expand Down

0 comments on commit 0650488

Please sign in to comment.