fix: enable graceful shutdown
1 file changed, 2 insertions(+), 1 deletion(-)
changed files
M cmd/searchix-web/serve.go → cmd/searchix-web/serve.go
@@ -6,6 +6,7 @@ "errors" "os" "os/signal" "sync" + "syscall" "github.com/Southclaws/fault" "github.com/Southclaws/fault/fmsg"@@ -22,7 +23,7 @@ type ServeOptions struct{} func (opts *ServeOptions) Execute(_ []string) (err error) { - ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt) + ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM) defer cancel() root, err := file.CreateAndOpenRoot(cfg.DataPath)