feat: pick jobs of the runner only

This commit is contained in:
Jason Song
2022-11-25 17:48:46 +08:00
parent ec673c0e79
commit 04634b9143
2 changed files with 15 additions and 4 deletions
+1 -1
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)
}