mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-26 08:31:22 +01:00
test: change redis connection (#13844)
This commit is contained in:
@@ -58,13 +58,12 @@ connection.connect = async function (options) {
|
|||||||
winston.error(err.stack);
|
winston.error(err.stack);
|
||||||
reject(err);
|
reject(err);
|
||||||
});
|
});
|
||||||
cxn.on('ready', () => {
|
|
||||||
|
cxn.connect().then(() => {
|
||||||
// back-compat with node_redis
|
// back-compat with node_redis
|
||||||
cxn.batch = cxn.multi;
|
cxn.batch = cxn.multi;
|
||||||
resolve(cxn);
|
|
||||||
});
|
|
||||||
cxn.connect().then(() => {
|
|
||||||
winston.info('Connected to Redis successfully');
|
winston.info('Connected to Redis successfully');
|
||||||
|
resolve(cxn);
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
winston.error('Error connecting to Redis:', err);
|
winston.error('Error connecting to Redis:', err);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user