diff options
Diffstat (limited to 'cmd/admin.go')
-rw-r--r-- | cmd/admin.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd/admin.go b/cmd/admin.go index 0b9f6eac44..f6f3e22b97 100644 --- a/cmd/admin.go +++ b/cmd/admin.go @@ -14,9 +14,10 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth/oauth2" "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/graceful" "code.gitea.io/gitea/modules/log" pwd "code.gitea.io/gitea/modules/password" - "code.gitea.io/gitea/modules/repository" + repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" "github.com/urfave/cli" @@ -375,7 +376,7 @@ func runRepoSyncReleases(c *cli.Context) error { } log.Trace(" currentNumReleases is %d, running SyncReleasesWithTags", oldnum) - if err = repository.SyncReleasesWithTags(repo, gitRepo); err != nil { + if err = repo_module.SyncReleasesWithTags(repo, gitRepo); err != nil { log.Warn(" SyncReleasesWithTags: %v", err) gitRepo.Close() continue @@ -410,7 +411,7 @@ func runRegenerateHooks(c *cli.Context) error { if err := initDB(); err != nil { return err } - return models.SyncRepositoryHooks() + return repo_module.SyncRepositoryHooks(graceful.GetManager().ShutdownContext()) } func runRegenerateKeys(c *cli.Context) error { |