From 69b61d437357235700306f28d22d21acc39bb2b5 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 7 Nov 2021 11:11:27 +0800 Subject: Fix bug on admin subcommand (#17533) * Fix bug on admin subcommand * Add signals for all initDB Co-authored-by: Lauris BH --- cmd/migrate.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cmd/migrate.go') diff --git a/cmd/migrate.go b/cmd/migrate.go index 7bb87d8400..054772d9ec 100644 --- a/cmd/migrate.go +++ b/cmd/migrate.go @@ -24,7 +24,10 @@ var CmdMigrate = cli.Command{ } func runMigrate(ctx *cli.Context) error { - if err := initDB(); err != nil { + stdCtx, cancel := installSignals() + defer cancel() + + if err := initDB(stdCtx); err != nil { return err } -- cgit v1.2.3