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

@@ -74,6 +74,11 @@ module.exports = function(db, module) {
db.collection('objects').remove({_key:key}, callback);
};
module.deleteAll = function(keys, callback) {
callback = callback || helpers.noop;
db.collection('objects').remove({_key: {$in: keys}}, callback);
};
module.get = function(key, callback) {
module.getObjectField(key, 'value', callback);
};