|
|
@ -30,6 +30,10 @@
|
|
|
|
redisClient = redis.createClient(nconf.get('redis:port'), nconf.get('redis:host'));
|
|
|
|
redisClient = redis.createClient(nconf.get('redis:port'), nconf.get('redis:host'));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (nconf.get('redis:password')) {
|
|
|
|
|
|
|
|
redisClient.auth(nconf.get('redis:password'));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
redisClient.on('error', function (err) {
|
|
|
|
redisClient.on('error', function (err) {
|
|
|
|
winston.error(err.message);
|
|
|
|
winston.error(err.message);
|
|
|
|
process.exit();
|
|
|
|
process.exit();
|
|
|
@ -51,10 +55,6 @@
|
|
|
|
postSearch = reds.createSearch('nodebbpostsearch'),
|
|
|
|
postSearch = reds.createSearch('nodebbpostsearch'),
|
|
|
|
topicSearch = reds.createSearch('nodebbtopicsearch');
|
|
|
|
topicSearch = reds.createSearch('nodebbtopicsearch');
|
|
|
|
|
|
|
|
|
|
|
|
if (nconf.get('redis:password')) {
|
|
|
|
|
|
|
|
redisClient.auth(nconf.get('redis:password'));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var db = parseInt(nconf.get('redis:database'), 10);
|
|
|
|
var db = parseInt(nconf.get('redis:database'), 10);
|
|
|
|
|
|
|
|
|
|
|
|
if (db){
|
|
|
|
if (db){
|
|
|
|