Skip to content

Commit

Permalink
log next day even when not sleeping
Browse files Browse the repository at this point in the history
  • Loading branch information
nicpottier committed Nov 13, 2020
1 parent b09109e commit 9e46c25
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/rp-archiver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,10 @@ func main() {
napTime := nextDay.Sub(time.Now().In(time.UTC))

if napTime > time.Duration(0) {
logrus.WithField("time", napTime).Info("Sleeping until next UTC day")
logrus.WithField("time", napTime).WithField("next_start", nextDay).Info("Sleeping until next UTC day")
time.Sleep(napTime)
} else {
logrus.WithField("next_start", nextDay).Info("Rebuilding immediately without sleep")
}
}
}

0 comments on commit 9e46c25

Please sign in to comment.