You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

init.go 556B

12345678910111213141516171819202122
  1. // Copyright 2022 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package actions
  4. import (
  5. "code.gitea.io/gitea/modules/graceful"
  6. "code.gitea.io/gitea/modules/notification"
  7. "code.gitea.io/gitea/modules/queue"
  8. "code.gitea.io/gitea/modules/setting"
  9. )
  10. func Init() {
  11. if !setting.Actions.Enabled {
  12. return
  13. }
  14. jobEmitterQueue = queue.CreateUniqueQueue("actions_ready_job", jobEmitterQueueHandle, new(jobUpdate))
  15. go graceful.GetManager().RunWithShutdownFns(jobEmitterQueue.Run)
  16. notification.RegisterNotifier(NewNotifier())
  17. }