|
|
@@ -31,6 +31,7 @@ import ( |
|
|
|
"code.gitea.io/gitea/modules/ssh" |
|
|
|
"code.gitea.io/gitea/modules/storage" |
|
|
|
"code.gitea.io/gitea/modules/task" |
|
|
|
"code.gitea.io/gitea/modules/timer" |
|
|
|
"code.gitea.io/gitea/modules/webhook" |
|
|
|
"code.gitea.io/gitea/services/mailer" |
|
|
|
mirror_service "code.gitea.io/gitea/services/mirror" |
|
|
@@ -134,6 +135,17 @@ func GlobalInit(ctx context.Context) { |
|
|
|
|
|
|
|
NewServices() |
|
|
|
|
|
|
|
// Launch cron job after DB configured. |
|
|
|
if models.HasEngine { |
|
|
|
log.Info("%s", unknwoni18n.Tr("en-US", "admin.dashboard.start_cron_job")) |
|
|
|
go timer.LaunchCronJob() |
|
|
|
} else { |
|
|
|
if err := models.SetEngine(); err == nil { |
|
|
|
log.Info("%s", unknwoni18n.Tr("en-US", "admin.dashboard.start_cron_job")) |
|
|
|
go timer.LaunchCronJob() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if setting.InstallLock { |
|
|
|
highlight.NewContext() |
|
|
|
external.RegisterParsers() |
|
|
|