Add check on task status in addition to desired status
This commit is contained in:
parent
a73fee50dc
commit
5c2d91ab84
1 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue