mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
feat: async3 upgrade (#7639)
* feat: async3 upgrade WIP * fix: async.doWhilst * fix: async early exit * fix: psql doUntil * fix: psql again
This commit is contained in:
committed by
GitHub
parent
6cebc7f069
commit
4d9bc30d1f
@@ -187,9 +187,9 @@ Analytics.getDailyStatsForSet = function (set, day, numDays, callback) {
|
||||
day.setDate(day.getDate() + 1); // set the date to tomorrow, because getHourlyStatsForSet steps *backwards* 24 hours to sum up the values
|
||||
day.setHours(0, 0, 0, 0);
|
||||
|
||||
async.whilst(function () {
|
||||
async.whilst(function (next) {
|
||||
numDays -= 1;
|
||||
return numDays + 1;
|
||||
next(null, numDays + 1);
|
||||
}, function (next) {
|
||||
Analytics.getHourlyStatsForSet(set, day.getTime() - (1000 * 60 * 60 * 24 * numDays), 24, function (err, day) {
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user