mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-10 08:42:00 +02:00
fix: do not init actions service when disabled
This commit is contained in:
1 file changed
+5
-3
@@ -23,12 +23,14 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func Init() {
|
func Init() {
|
||||||
|
if !setting.Actions.Enabled {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
jobEmitterQueue = queue.CreateUniqueQueue("actions_ready_job", jobEmitterQueueHandle, new(jobUpdate))
|
jobEmitterQueue = queue.CreateUniqueQueue("actions_ready_job", jobEmitterQueueHandle, new(jobUpdate))
|
||||||
go graceful.GetManager().RunWithShutdownFns(jobEmitterQueue.Run)
|
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 {
|
func DeleteResourceOfRepository(ctx context.Context, repo *repo_model.Repository) error {
|
||||||
|
|||||||
Reference in new issue
Block a user