diff options
author | zeripath <art27@cantab.net> | 2020-05-07 22:49:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-07 22:49:00 +0100 |
commit | 791353c03ba81d1c67393a04256a77293307ecad (patch) | |
tree | b0771f7e1683db318c5e5606a312319578392dcd /routers/init.go | |
parent | 486e4c8087746ca91c05a693cadd563ac061a913 (diff) | |
download | gitea-791353c03ba81d1c67393a04256a77293307ecad.tar.gz gitea-791353c03ba81d1c67393a04256a77293307ecad.zip |
Add EventSource support (#11235)
If the browser supports EventSource switch to use this instead of
polling notifications.
Signed-off-by: Andrew Thornton art27@cantab.net
Diffstat (limited to 'routers/init.go')
-rw-r--r-- | routers/init.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/init.go b/routers/init.go index 724bf84c10..72f55c809c 100644 --- a/routers/init.go +++ b/routers/init.go @@ -15,6 +15,7 @@ import ( "code.gitea.io/gitea/modules/auth/sso" "code.gitea.io/gitea/modules/cache" "code.gitea.io/gitea/modules/cron" + "code.gitea.io/gitea/modules/eventsource" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/highlight" code_indexer "code.gitea.io/gitea/modules/indexer/code" @@ -123,6 +124,7 @@ func GlobalInit(ctx context.Context) { if err := task.Init(); err != nil { log.Fatal("Failed to initialize task scheduler: %v", err) } + eventsource.GetManager().Init() } if setting.EnableSQLite3 { log.Info("SQLite3 Supported") |