diff options
author | zeripath <art27@cantab.net> | 2022-07-15 16:20:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-15 16:20:05 +0100 |
commit | dbd3b7f9fd367ffabc89706e19af85713f0e0e11 (patch) | |
tree | aad98f62e801b158ebbba21fd3b658825114194c /routers/init.go | |
parent | 4f267ef64343f790ecbe23299effbc806f77ef6d (diff) | |
download | gitea-dbd3b7f9fd367ffabc89706e19af85713f0e0e11.tar.gz gitea-dbd3b7f9fd367ffabc89706e19af85713f0e0e11.zip |
Initialize cron last (#20373)
Cron will try to run certain things at startup but these depend on multiple things
being set-up. Therefore we should initialize cron last.
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'routers/init.go')
-rw-r--r-- | routers/init.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/routers/init.go b/routers/init.go index 72ccf3526c..e640ca4845 100644 --- a/routers/init.go +++ b/routers/init.go @@ -141,7 +141,6 @@ func GlobalInitInstalled(ctx context.Context) { mustInit(repo_service.Init) // Booting long running goroutines. - cron.NewContext(ctx) issue_indexer.InitIssueIndexer(false) code_indexer.Init() mustInit(stats_indexer.Init) @@ -160,6 +159,9 @@ func GlobalInitInstalled(ctx context.Context) { auth.Init() svg.Init() + + // Finally start up the cron + cron.NewContext(ctx) } // NormalRoutes represents non install routes |