fix: do not init actions service when disabled

This commit is contained in:
Jason Song 2022-12-29 16:19:25 +08:00
parent 5ae2816ac4
commit a145ec2f2b
No known key found for this signature in database
GPG Key ID: 8402EEEE4511A8B5

View File

@ -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 {