notifications.prune

run every hour
dont get more than 500 notifications
This commit is contained in:
barisusakli
2014-09-07 03:17:51 -04:00
parent 273db693e7
commit 2252ab7479
4 changed files with 39 additions and 18 deletions

View File

@@ -41,6 +41,10 @@ module.exports = function(db, module) {
db.del(key, callback);
};
module.deleteAll = function(keys, callback) {
async.each(keys, module.delete, callback);
};
module.get = function(key, callback) {
db.get(key, function(err, value) {
callback(false, value);