feat: pick jobs of the runner only

This commit is contained in:
Jason Song
2022-10-24 17:27:15 +08:00
parent ec673c0e79
commit 04634b9143
2 changed files with 15 additions and 4 deletions

View File

@ -211,7 +211,7 @@ func (s *Service) UpdateLog(
}
func (s *Service) pickTask(ctx context.Context, runner *bots_model.Runner) (*runnerv1.Task, bool, error) {
t, ok, err := bots_model.CreateTaskForRunner(runner)
t, ok, err := bots_model.CreateTaskForRunner(ctx, runner)
if err != nil {
return nil, false, fmt.Errorf("CreateTaskForRunner: %w", err)
}