Mercurial > code > home > repos > gcalendarwatch
diff calsync/main.go @ 80:e8164bd2f9a1
hoist startupJitter to main
author | drewp@bigasterisk.com |
---|---|
date | Fri, 06 Sep 2024 18:25:32 -0700 |
parents | 329144c7e711 |
children | 0f0b15d8062c |
line wrap: on
line diff
--- a/calsync/main.go Fri Sep 06 18:24:38 2024 -0700 +++ b/calsync/main.go Fri Sep 06 18:25:32 2024 -0700 @@ -28,6 +28,8 @@ "github.com/gorilla/mux" ) +const startupJitter = 0 * time.Second + func main() { startLogging() ctx := context.Background() @@ -55,7 +57,7 @@ initialSyncBack := (7 * 24) * time.Hour initialSyncAhead := (14 * 24) * time.Hour - err = updateMongoEventsToMatchGoogleForever(mc, gc, initialSyncBack, initialSyncAhead, notifications) + err = updateMongoEventsToMatchGoogleForever(mc, gc, initialSyncBack, initialSyncAhead, notifications, startupJitter) if err != nil { log.Fatal(err) }