Fix RequestLogCollectorJob sometimes not properly shutting down
This commit is contained in:
@@ -144,6 +144,8 @@ func (app *Application) Run() {
|
||||
job.Stop()
|
||||
}
|
||||
|
||||
log.Info().Msg("Manually stopped Jobs")
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
|
||||
defer cancel()
|
||||
err := app.Database.Stop(ctx)
|
||||
@@ -151,6 +153,8 @@ func (app *Application) Run() {
|
||||
log.Info().Err(err).Msg("Error while stopping the database")
|
||||
}
|
||||
|
||||
log.Info().Msg("Manually closed database connection")
|
||||
|
||||
app.IsRunning.Set(false)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user