Skip to content

Commit be996fe

Browse files
committed
fix: look to number of tasks after run on retry
1 parent 849646a commit be996fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/task_definitions_run.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,12 @@ func taskDefinitionsRunRun(cmd *cobra.Command, args []string) {
164164
var taskResult *ecs.RunTaskOutput
165165
for {
166166
taskResult, err = ecsI.RunTask(runTaskInput)
167-
if err == nil || retryCount >= retryLimit {
167+
168+
if err != nil || retryCount >= retryLimit || len(taskResult.Tasks) > 0 {
168169
break
169170
}
170171

171172
retryCount = retryCount + 1
172-
err = nil
173173

174174
time.Sleep(1 * time.Second)
175175
}

0 commit comments

Comments
 (0)