fix: add missing await

v1.18.x
Barış Soner Uşaklı 4 years ago
parent ceb1566834
commit 9938a139fe

@ -329,7 +329,7 @@ Notifications.prune = async function () {
await batch.processSortedSet('users:joindate', async function (uids) { await batch.processSortedSet('users:joindate', async function (uids) {
const unread = uids.map(uid => 'uid:' + uid + ':notifications:unread'); const unread = uids.map(uid => 'uid:' + uid + ':notifications:unread');
const read = uids.map(uid => 'uid:' + uid + ':notifications:read'); const read = uids.map(uid => 'uid:' + uid + ':notifications:read');
db.sortedSetsRemoveRangeByScore(unread.concat(read), '-inf', cutoffTime); await db.sortedSetsRemoveRangeByScore(unread.concat(read), '-inf', cutoffTime);
}, { batch: 500, interval: 100 }); }, { batch: 500, interval: 100 });
} catch (err) { } catch (err) {
if (err) { if (err) {

Loading…
Cancel
Save