From 3e88f44437ef77360c10df70d0af90338bfb35da Mon Sep 17 00:00:00 2001 From: hageshtrem Date: Fri, 21 Apr 2023 10:50:59 +0300 Subject: [PATCH] Catch SIGTERM in webui --- cmd/workwebui/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/workwebui/main.go b/cmd/workwebui/main.go index 6ffe0cd2..ee7f34c2 100644 --- a/cmd/workwebui/main.go +++ b/cmd/workwebui/main.go @@ -6,10 +6,11 @@ import ( "os" "os/signal" "strconv" + "syscall" "time" - "github.com/sbermarket-tech/work/webui" "github.com/gomodule/redigo/redis" + "github.com/sbermarket-tech/work/webui" ) var ( @@ -40,7 +41,7 @@ func main() { server.Start() c := make(chan os.Signal, 1) - signal.Notify(c, os.Interrupt, os.Kill) + signal.Notify(c, os.Interrupt, syscall.SIGTERM, syscall.SIGQUIT) <-c