1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

fix: summary missing interval calculation (fix #168)

This commit is contained in:
Ferdinand Mütsch
2021-04-12 22:57:15 +02:00
parent 6256c8e10a
commit 0f1d1bce4d
4 changed files with 388 additions and 320 deletions

View File

@ -38,11 +38,6 @@ type AggregationJob struct {
// Schedule a job to (re-)generate summaries every day shortly after midnight
func (srv *AggregationService) Schedule() {
// Run once initially
if err := srv.Run(nil); err != nil {
logbuch.Fatal("failed to run AggregationJob: %v", err)
}
s := gocron.NewScheduler(time.Local)
s.Every(1).Day().At(srv.config.App.AggregationTime).Do(srv.Run, map[string]bool{})
s.StartBlocking()