changed sortedSetRangeByScore

This commit is contained in:
barisusakli
2014-04-10 20:59:17 -04:00
parent 74ff579412
commit 9d405812cb
6 changed files with 13 additions and 18 deletions

View File

@@ -114,7 +114,7 @@ var async = require('async'),
UserNotifications.getDailyUnread = function(uid, callback) {
var now = Date.now(),
yesterday = now - (1000*60*60*24); // Approximate, can be more or less depending on time changes, makes no difference really.
db.getSortedSetRangeByScore(['uid:' + uid + ':notifications:unread', yesterday, now], function(err, nids) {
db.getSortedSetRangeByScore('uid:' + uid + ':notifications:unread', 0, 20, yesterday, now, function(err, nids) {
async.map(nids, function(nid, next) {
notifications.get(nid, uid, function(notif_data) {
next(null, notif_data);