Filter ECS tasks by LastStatus before adding to list of service tasks
This commit is contained in:
parent
e42ddfc3d6
commit
2f65572247
1 changed files with 3 additions and 1 deletions
|
@ -234,7 +234,9 @@ func (p *Provider) listInstances(ctx context.Context, client *awsClient) ([]ecsI
|
|||
log.Errorf("Unable to describe tasks for %v", page.TaskArns)
|
||||
} else {
|
||||
for _, t := range resp.Tasks {
|
||||
tasks[aws.StringValue(t.TaskArn)] = t
|
||||
if aws.StringValue(t.LastStatus) == ecs.DesiredStatusRunning {
|
||||
tasks[aws.StringValue(t.TaskArn)] = t
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue