diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-11-07 11:11:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-07 11:11:27 +0800 |
commit | 69b61d437357235700306f28d22d21acc39bb2b5 (patch) | |
tree | 33af1d4d797b428556a323837fcc3eda38a54479 /cmd/dump.go | |
parent | c9110eb5e4657e018695f084f37e1b423939e9e0 (diff) | |
download | gitea-69b61d437357235700306f28d22d21acc39bb2b5.tar.gz gitea-69b61d437357235700306f28d22d21acc39bb2b5.zip |
Fix bug on admin subcommand (#17533)
* Fix bug on admin subcommand
* Add signals for all initDB
Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'cmd/dump.go')
-rw-r--r-- | cmd/dump.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/dump.go b/cmd/dump.go index 70ed6c2b55..efb9397208 100644 --- a/cmd/dump.go +++ b/cmd/dump.go @@ -173,7 +173,10 @@ func runDump(ctx *cli.Context) error { } setting.NewServices() // cannot access session settings otherwise - err := db.InitEngine() + stdCtx, cancel := installSignals() + defer cancel() + + err := db.InitEngine(stdCtx) if err != nil { return err } |