Skip to content

Commit

Permalink
start and shutdown crons in adhoc flow (#741)
Browse files Browse the repository at this point in the history
  • Loading branch information
smonero authored Apr 1, 2024
1 parent 4b99dfc commit a3ae577
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/neptune/adhoc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ func (s Server) Start() error {

ctx := context.Background()

for _, cron := range s.Crons {
s.CronScheduler.Schedule(cron)
}

var wg sync.WaitGroup

wg.Add(1)
Expand Down Expand Up @@ -273,6 +277,7 @@ func (s Server) shutdown() {
s.Logger.Error(err.Error())
}

s.CronScheduler.Shutdown(5 * time.Second)
s.Logger.Close()
}

Expand Down

0 comments on commit a3ae577

Please sign in to comment.