feat: create task steps

This commit is contained in:
Jason Song
2022-10-12 14:46:06 +08:00
parent 699f5c5a06
commit 6df53243aa
5 changed files with 48 additions and 8 deletions

View File

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