Fix?
This commit is contained in:
@@ -21,15 +21,13 @@ func (job *RecalculateCurrentDayStatsJob) Run() error {
|
||||
defer ticker.Stop()
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-ticker.C:
|
||||
job.recalculateCurrentDayStats()
|
||||
}
|
||||
<-ticker.C
|
||||
job.recalculateCurrentDayStats()
|
||||
}
|
||||
}
|
||||
|
||||
func (job *RecalculateCurrentDayStatsJob) recalculateCurrentDayStats() {
|
||||
today := time.Now().Truncate(24 * time.Hour)
|
||||
today := time.Now()
|
||||
yesterday := today.Add(-24 * time.Hour)
|
||||
|
||||
database.DeleteDailyStatsForDay(job.DB, today)
|
||||
|
||||
Reference in New Issue
Block a user