graceful
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m50s

This commit is contained in:
matst80
2024-11-10 18:54:24 +01:00
parent 09e005f0e7
commit 5aeea62bad
2 changed files with 6 additions and 1 deletions

View File

@@ -206,8 +206,9 @@ func main() {
mux.Handle("/metrics", promhttp.Handler())
sigs := make(chan os.Signal, 1)
signal.Notify(sigs, syscall.SIGTERM)
done := make(chan bool, 1)
signal.Notify(sigs, syscall.SIGTERM)
go func() {
sig := <-sigs
fmt.Println("Shutting down due to signal:", sig)