From 9fb16e3520f30bf27a5950e2c0b3e8f2c379d1d5 Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Fri, 10 Feb 2017 14:28:53 -0600 Subject: [PATCH 1/2] Fix forum instances using Redis dropping socket.io messages. Bug introduced in b08acd197c2fb18becf5a05010fcdd8e82fc5107. https://github.com/socketio/socket.io-redis/releases/tag/3.0.0 https://github.com/socketio/socket.io-redis/issues/185 --- src/socket.io/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/socket.io/index.js b/src/socket.io/index.js index 82f597011d..58e31a78ea 100644 --- a/src/socket.io/index.js +++ b/src/socket.io/index.js @@ -197,7 +197,7 @@ function addRedisAdapter(io) { var redisAdapter = require('socket.io-redis'); var redis = require('../database/redis'); var pub = redis.connect(); - var sub = redis.connect({return_buffers: true}); + var sub = redis.connect(); io.adapter(redisAdapter({pubClient: pub, subClient: sub})); } else if (nconf.get('isCluster') === 'true') { winston.warn('[socket.io] Clustering detected, you are advised to configure Redis as a websocket store.'); From 6289f118aed23a334fe6002f9090307b6ec12da1 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 10 Feb 2017 15:52:05 -0500 Subject: [PATCH 2/2] updated cron strings with 5-digit strings instead of 6-digit ones --- src/user/jobs.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/user/jobs.js b/src/user/jobs.js index 956559b470..c01f2c613c 100644 --- a/src/user/jobs.js +++ b/src/user/jobs.js @@ -32,28 +32,28 @@ module.exports = function (User) { } winston.verbose('[user/jobs] ' + terminated + ' jobs terminated'); - jobs['digest.daily'] = new cronJob('0 0 ' + digestHour + ' * * *', function () { + jobs['digest.daily'] = new cronJob('0 ' + digestHour + ' * * *', function () { winston.verbose('[user/jobs] Digest job (daily) started.'); User.digest.execute('day'); }, null, true); winston.verbose('[user/jobs] Starting job (digest.daily)'); ++started; - jobs['digest.weekly'] = new cronJob('0 0 ' + digestHour + ' * * 0', function () { + jobs['digest.weekly'] = new cronJob('0 ' + digestHour + ' * * 0', function () { winston.verbose('[user/jobs] Digest job (weekly) started.'); User.digest.execute('week'); }, null, true); winston.verbose('[user/jobs] Starting job (digest.weekly)'); ++started; - jobs['digest.monthly'] = new cronJob('0 0 ' + digestHour + ' 1 * *', function () { + jobs['digest.monthly'] = new cronJob('0 ' + digestHour + ' 1 * *', function () { winston.verbose('[user/jobs] Digest job (monthly) started.'); User.digest.execute('month'); }, null, true); winston.verbose('[user/jobs] Starting job (digest.monthly)'); ++started; - jobs['reset.clean'] = new cronJob('0 0 0 * * *', User.reset.clean, null, true); + jobs['reset.clean'] = new cronJob('0 0 * * *', User.reset.clean, null, true); winston.verbose('[user/jobs] Starting job (reset.clean)'); ++started;