Skip to content

Commit 464b3d8

Browse files
committed
feat(job): add timeout parameter to job scheduling
Signed-off-by: Gaius <gaius.qi@gmail.com>
1 parent fb93f29 commit 464b3d8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

manager/service/job.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ func (s *service) createGetTaskJobsSync(ctx context.Context, layers []internaljo
352352
Application: file.Application,
353353
FilteredQueryParams: file.FilteredQueryParams,
354354
ConcurrentPeerCount: json.Args.ConcurrentPeerCount,
355+
Timeout: json.Args.Timeout,
355356
},
356357
SchedulerClusterIDs: json.SchedulerClusterIDs,
357358
}, schedulers)
@@ -405,7 +406,7 @@ func (s *service) createGetTaskJobSync(ctx context.Context, json types.CreateGet
405406
return nil, err
406407
}
407408

408-
s.pollingJob(context.Background(), internaljob.GetTaskJob, job.ID, job.TaskID, 3, 5, 4)
409+
s.pollingJob(context.Background(), internaljob.GetTaskJob, job.ID, job.TaskID, 3, 5, 60)
409410
if err := s.db.WithContext(ctx).Preload("SeedPeerClusters").Preload("SchedulerClusters").First(&job, job.ID).Error; err != nil {
410411
return nil, err
411412
}

0 commit comments

Comments
 (0)