mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
added init method to database, progress made
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
redis_socket_or_host = nconf.get('redis:host'),
|
||||
utils = require('./../../public/src/utils.js');
|
||||
|
||||
|
||||
if (redis_socket_or_host && redis_socket_or_host.indexOf('/')>=0) {
|
||||
/* If redis.host contains a path name character, use the unix dom sock connection. ie, /tmp/redis.sock */
|
||||
redisClient = redis.createClient(nconf.get('redis:host'));
|
||||
@@ -20,14 +21,13 @@
|
||||
redisClient = redis.createClient(nconf.get('redis:port'), nconf.get('redis:host'));
|
||||
}
|
||||
|
||||
module.client = redisClient;
|
||||
|
||||
module.sessionStore = new connectRedis({
|
||||
client: redisClient,
|
||||
ttl: 60 * 60 * 24 * 30
|
||||
});
|
||||
|
||||
module.client = redisClient;
|
||||
module.type = 'redis';
|
||||
|
||||
if (nconf.get('redis:password')) {
|
||||
redisClient.auth(nconf.get('redis:password'));
|
||||
}
|
||||
@@ -43,6 +43,11 @@
|
||||
});
|
||||
}
|
||||
|
||||
module.init = function(callback) {
|
||||
callback(null);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* A possibly more efficient way of doing multiple sismember calls
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user