Ver código fonte

update config

DevYK 3 anos atrás
pai
commit
09f994d26d
1 arquivos alterados com 6 adições e 11 exclusões
  1. 6 11
      model/redis_db.js

+ 6 - 11
model/redis_db.js

@@ -18,21 +18,16 @@ if (config.build_config.open_test == 0) {
 // username: username,
 // password: password,
 console.log('host , post', host, port)
-var REDIS_INSTANCE = new Redis({
+
+const opts = {
   port: port,
   host: host,
-  username: username,
-  password: password,
+  // username: username,
+  // password: password,
   connectTimeout: 10000,
-});
+}
 
-// var REDIS_INSTANCE = new Redis.Cluster([
-//   {
-//     port: port,
-//     password: password,
-//     host: host,
-//   },
-// ]);
+var REDIS_INSTANCE = new Redis(opts);
 
 REDIS_INSTANCE.on('connect', () => {
   console.log('connected to redis')