summaryrefslogtreecommitdiffstats
path: root/routers/init.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/init.go')
-rw-r--r--routers/init.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/routers/init.go b/routers/init.go
index 85a38899e3..0f2e993413 100644
--- a/routers/init.go
+++ b/routers/init.go
@@ -11,7 +11,6 @@ import (
"code.gitea.io/gitea/models"
asymkey_model "code.gitea.io/gitea/models/asymkey"
- "code.gitea.io/gitea/modules/appstate"
"code.gitea.io/gitea/modules/cache"
"code.gitea.io/gitea/modules/eventsource"
"code.gitea.io/gitea/modules/git"
@@ -27,6 +26,7 @@ import (
"code.gitea.io/gitea/modules/ssh"
"code.gitea.io/gitea/modules/storage"
"code.gitea.io/gitea/modules/svg"
+ "code.gitea.io/gitea/modules/system"
"code.gitea.io/gitea/modules/templates"
"code.gitea.io/gitea/modules/translation"
"code.gitea.io/gitea/modules/util"
@@ -76,8 +76,8 @@ func InitGitServices() {
}
func syncAppPathForGit(ctx context.Context) error {
- runtimeState := new(appstate.RuntimeState)
- if err := appstate.AppState.Get(runtimeState); err != nil {
+ runtimeState := new(system.RuntimeState)
+ if err := system.AppState.Get(runtimeState); err != nil {
return err
}
if runtimeState.LastAppPath != setting.AppPath {
@@ -90,7 +90,7 @@ func syncAppPathForGit(ctx context.Context) error {
mustInit(asymkey_model.RewriteAllPublicKeys)
runtimeState.LastAppPath = setting.AppPath
- return appstate.AppState.Set(runtimeState)
+ return system.AppState.Set(runtimeState)
}
return nil
}
@@ -133,10 +133,10 @@ func GlobalInitInstalled(ctx context.Context) {
mustInitCtx(ctx, common.InitDBEngine)
log.Info("ORM engine initialization successful!")
- mustInit(appstate.Init)
+ mustInit(system.Init)
mustInit(oauth2.Init)
- models.NewRepoContext()
+ mustInit(models.Init)
mustInit(repo_service.Init)
// Booting long running goroutines.