mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +00:00
Move some helper files out of models (#19355)
* Move some helper files out of models * Some improvements Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
parent
d4834071da
commit
4ca1d7547a
23 changed files with 108 additions and 107 deletions
|
@ -73,7 +73,7 @@ func mustInitCtx(ctx context.Context, fn func(ctx context.Context) error) {
|
|||
func InitGitServices() {
|
||||
setting.NewServices()
|
||||
mustInit(storage.Init)
|
||||
mustInit(repo_service.NewContext)
|
||||
mustInit(repo_service.Init)
|
||||
}
|
||||
|
||||
func syncAppPathForGit(ctx context.Context) error {
|
||||
|
@ -116,7 +116,9 @@ func GlobalInitInstalled(ctx context.Context) {
|
|||
// Setup i18n
|
||||
translation.InitLocales()
|
||||
|
||||
InitGitServices()
|
||||
setting.NewServices()
|
||||
mustInit(storage.Init)
|
||||
|
||||
mailer.NewContext()
|
||||
mustInit(cache.NewContext)
|
||||
notification.NewContext()
|
||||
|
@ -138,6 +140,7 @@ func GlobalInitInstalled(ctx context.Context) {
|
|||
mustInit(oauth2.Init)
|
||||
|
||||
models.NewRepoContext()
|
||||
mustInit(repo_service.Init)
|
||||
|
||||
// Booting long running goroutines.
|
||||
cron.NewContext(ctx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue