mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-21 16:00:26 +01:00
closes #5639
This commit is contained in:
@@ -219,7 +219,11 @@ function addRedisAdapter(io) {
|
|||||||
var redis = require('../database/redis');
|
var redis = require('../database/redis');
|
||||||
var pub = redis.connect();
|
var pub = redis.connect();
|
||||||
var sub = redis.connect();
|
var sub = redis.connect();
|
||||||
io.adapter(redisAdapter({ pubClient: pub, subClient: sub }));
|
io.adapter(redisAdapter({
|
||||||
|
key: 'db:' + nconf.get('redis:database') + ':adapter_key',
|
||||||
|
pubClient: pub,
|
||||||
|
subClient: sub,
|
||||||
|
}));
|
||||||
} else if (nconf.get('isCluster') === 'true') {
|
} else if (nconf.get('isCluster') === 'true') {
|
||||||
winston.warn('[socket.io] Clustering detected, you are advised to configure Redis as a websocket store.');
|
winston.warn('[socket.io] Clustering detected, you are advised to configure Redis as a websocket store.');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user