Skip to content

Commit

Permalink
fix: look to number of tasks after run on retry
Browse files Browse the repository at this point in the history
  • Loading branch information
gumieri committed May 7, 2024
1 parent 849646a commit be996fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/task_definitions_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ func taskDefinitionsRunRun(cmd *cobra.Command, args []string) {
var taskResult *ecs.RunTaskOutput
for {
taskResult, err = ecsI.RunTask(runTaskInput)
if err == nil || retryCount >= retryLimit {

if err != nil || retryCount >= retryLimit || len(taskResult.Tasks) > 0 {
break
}

retryCount = retryCount + 1
err = nil

time.Sleep(1 * time.Second)
}
Expand Down

0 comments on commit be996fe

Please sign in to comment.