Skip to content
This repository has been archived by the owner on Aug 31, 2020. It is now read-only.

Commit

Permalink
removed unnecessary task inspect code
Browse files Browse the repository at this point in the history
  • Loading branch information
nustiueudinastea committed Mar 24, 2017
1 parent 4239baa commit 0fda85d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions swarm.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,10 @@ func discoverSwarm(prometheusContainerID string) {
taskNetworks := make(map[string]swarm.Network)

for _, task := range tasks {
taskRaw, _, err := cli.TaskInspectWithRaw(context.Background(), task.ID)
if err != nil {
panic(err)
}

var containerIPs []string

for _, netatt := range taskRaw.NetworksAttachments {
for _, netatt := range task.NetworksAttachments {
if netatt.Network.Spec.Name == "ingress" || netatt.Network.DriverState.Name != "overlay" {
continue
}
Expand Down

0 comments on commit 0fda85d

Please sign in to comment.