mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
fixed active_users not deleting over 10
This commit is contained in:
@@ -319,8 +319,7 @@ var RDB = require('./redis.js'),
|
|||||||
RDB.zadd('categories:recent_posts:cid:' + cid, timestamp, pid);
|
RDB.zadd('categories:recent_posts:cid:' + cid, timestamp, pid);
|
||||||
RDB.zadd('categories:' + cid + ':tid', timestamp, tid);
|
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(err, amount) {
|
||||||
RDB.scard('cid:' + cid + ':active_users', function(amount) {
|
|
||||||
if (amount > 10) {
|
if (amount > 10) {
|
||||||
RDB.spop('cid:' + cid + ':active_users');
|
RDB.spop('cid:' + cid + ':active_users');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user