1
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-02-02 15:09:33 -05:00

fix: do not init cron for actions when it's disabled

This commit is contained in:
Jason Song 2022-12-23 16:55:55 +08:00
parent 950a5ad29c
commit a6917db570
No known key found for this signature in database
GPG Key ID: 8402EEEE4511A8B5

View File

@ -7,10 +7,14 @@ import (
"context"
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/setting"
actions_service "code.gitea.io/gitea/services/actions"
)
func initActionsTasks() {
if !setting.Actions.Enabled {
return
}
registerStopZombieTasks()
registerStopEndlessTasks()
registerCancelAbandonedJobs()