aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--service/app_runner.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/service/app_runner.go b/service/app_runner.go
index a960e70..9d281cf 100644
--- a/service/app_runner.go
+++ b/service/app_runner.go
@@ -115,6 +115,12 @@ func (r *AppRunner) RunForever(enableBg bool) {
115 // go run foreground 115 // go run foreground
116 // go run background if enabled 116 // go run background if enabled
117 select { 117 select {
118 case <-r.ctx.Done():
119 r.Logger.Info("Waiting for jobs to terminate")
120 r.wg.Wait()
121
122 r.Logger.Info("Shutdown completed")
123 return
118 case <-r.sigs: 124 case <-r.sigs:
119 r.Logger.Info("Shutting down main app context") 125 r.Logger.Info("Shutting down main app context")
120 r.ctxCancel() 126 r.ctxCancel()