mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-27 19:12:48 +09:00
feat: record job needs
This commit is contained in:
@ -64,7 +64,7 @@ func StopEndlessTasks(ctx context.Context) error {
|
||||
// CancelAbandonedJobs cancels the jobs which have waiting status, but haven't been picked by a runner for a long time
|
||||
func CancelAbandonedJobs(ctx context.Context) error {
|
||||
jobs, _, err := bots_model.FindRunJobs(ctx, bots_model.FindRunJobOptions{
|
||||
Status: bots_model.StatusWaiting,
|
||||
Statuses: []bots_model.Status{bots_model.StatusWaiting, bots_model.StatusBlocked},
|
||||
StartedBefore: timeutil.TimeStamp(time.Now().Add(-abandonedJobTimeout).Unix()),
|
||||
})
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user