Skip to content

Commit 81f4577

Browse files
FiveTwenty AWS Bastionnorman-abramovitz
authored andcommitted
Allow scheduler to start if timezone is missing
1 parent 2ae5457 commit 81f4577

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/scheduler/main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,10 @@ func main() {
121121
timezoneFile := "/var/vcap/store/scheduler/scheduler_timezones.json"
122122
if err := cron.InitializeTimezones(timezoneFile); err != nil {
123123
log.Error(tag, fmt.Sprintf("Cannot process timezone file: %v", err.Error()))
124-
os.Exit(255)
124+
log.Error(tag, "Starting scheduler without timezones loaded")
125+
} else {
126+
log.Info(tag, fmt.Sprintf("Timezone file loaded successfully with %d entries", len(cron.TimezonesSlice)))
125127
}
126-
log.Info(tag, fmt.Sprintf("Timezone file loaded successfully with %d entries", len(cron.TimezonesSlice)))
127128

128129
auth := cf.NewAuthService(cfclient, log)
129130
jobs := postgres.NewJobService(db)

0 commit comments

Comments
 (0)