mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 14:35:47 +01:00
added db function
This commit is contained in:
@@ -245,13 +245,11 @@ var async = require('async'),
|
|||||||
}
|
}
|
||||||
|
|
||||||
async.eachSeries(results.expiredNids, function(nid, next) {
|
async.eachSeries(results.expiredNids, function(nid, next) {
|
||||||
var multi = RDB.multi();
|
|
||||||
|
|
||||||
for(var x=0; x<results.inboxes.length; ++x) {
|
db.sortedSetsScore(results.inboxes, function(err, results) {
|
||||||
multi.zscore(results.inboxes[x], nid);
|
if(err) {
|
||||||
|
return next(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
multi.exec(function(err, results) {
|
|
||||||
// If the notification is not present in any inbox, delete it altogether
|
// If the notification is not present in any inbox, delete it altogether
|
||||||
var expired = results.every(function(present) {
|
var expired = results.every(function(present) {
|
||||||
if (present === null) {
|
if (present === null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user