Node.js based forum software built for the modern web
refactor: single remove
Barış Soner Uşaklı77dd6dd0e7e3
diff --git a/src/analytics.js b/src/analytics.jsindex 16ae85cea9..45e8f698d9 100644--- a/src/analytics.js+++ b/src/analytics.js@@ -39,9 +39,7 @@ Analytics.init = async function () {if (runJobs) {new cronJob('*/30 * * * *', (async () => {- const cutoff = Date.now() - 172800000;- const ips = await db.getSortedSetRangeByScore('ip:recent', 0, 500, '-inf', cutoff);- await db.sortedSetRemove('ip:recent', ips);+ await db.sortedSetsRemoveRangeByScore(['ip:recent'], '-inf', Date.now() - 172800000);}), null, true);}