summaryrefslogtreecommitdiffstats
path: root/services/actions/init.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/actions/init.go')
-rw-r--r--services/actions/init.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/services/actions/init.go b/services/actions/init.go
index 8a9a30084a..26573c1681 100644
--- a/services/actions/init.go
+++ b/services/actions/init.go
@@ -5,6 +5,7 @@ package actions
import (
"code.gitea.io/gitea/modules/graceful"
+ "code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/notification"
"code.gitea.io/gitea/modules/queue"
"code.gitea.io/gitea/modules/setting"
@@ -15,8 +16,11 @@ func Init() {
return
}
- jobEmitterQueue = queue.CreateUniqueQueue("actions_ready_job", jobEmitterQueueHandler)
- go graceful.GetManager().RunWithShutdownFns(jobEmitterQueue.Run)
+ jobEmitterQueue = queue.CreateUniqueQueue(graceful.GetManager().ShutdownContext(), "actions_ready_job", jobEmitterQueueHandler)
+ if jobEmitterQueue == nil {
+ log.Fatal("Unable to create actions_ready_job queue")
+ }
+ go graceful.GetManager().RunWithCancel(jobEmitterQueue)
notification.RegisterNotifier(NewNotifier())
}