Add check on task status in addition to desired status

This commit is contained in:
yshay 2017-03-16 16:38:40 +02:00 committed by Emile Vauge
parent a73fee50dc
commit 5c2d91ab84
No known key found for this signature in database
GPG key ID: D808B4C167352E59

View file

@ -828,6 +828,9 @@ func listTasks(ctx context.Context, dockerClient client.APIClient, serviceID str
var dockerDataList []dockerData
for _, task := range taskList {
if task.Status.State != swarm.TaskStateRunning {
continue
}
dockerData := parseTasks(task, serviceDockerData, networkMap, isGlobalSvc)
dockerDataList = append(dockerDataList, dockerData)
}