diff --git a/services/actions/actions.go b/services/actions/actions.go index c434f570ed..1a0ed4b55e 100644 --- a/services/actions/actions.go +++ b/services/actions/actions.go @@ -23,12 +23,14 @@ import ( ) func Init() { + if !setting.Actions.Enabled { + return + } + jobEmitterQueue = queue.CreateUniqueQueue("actions_ready_job", jobEmitterQueueHandle, new(jobUpdate)) go graceful.GetManager().RunWithShutdownFns(jobEmitterQueue.Run) - if setting.Actions.Enabled { - notification.RegisterNotifier(NewNotifier()) - } + notification.RegisterNotifier(NewNotifier()) } func DeleteResourceOfRepository(ctx context.Context, repo *repo_model.Repository) error {