From 7798004568ecb45fc7f2dbe74f211c7cc34d8d62 Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Mon, 9 Sep 2013 16:27:16 -0400 Subject: [PATCH] fixed active_users not deleting over 10 --- src/posts.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/posts.js b/src/posts.js index 97f8d55bdf..ca56201021 100644 --- a/src/posts.js +++ b/src/posts.js @@ -319,8 +319,7 @@ var RDB = require('./redis.js'), RDB.zadd('categories:recent_posts:cid:' + cid, timestamp, pid); RDB.zadd('categories:' + cid + ':tid', timestamp, tid); - // this is a bit of a naive implementation, defn something to look at post-MVP - RDB.scard('cid:' + cid + ':active_users', function(amount) { + RDB.scard('cid:' + cid + ':active_users', function(err, amount) { if (amount > 10) { RDB.spop('cid:' + cid + ':active_users'); }