1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-10-05 18:03:21 +08:00

Omit race conditions and update swarm info events

This commit is contained in:
Marcos Lilljedahl
2016-12-02 10:29:41 -03:00
parent 84da622775
commit a7811b4e33
4 changed files with 15 additions and 12 deletions

View File

@@ -9,6 +9,8 @@ func (c checkSwarmStatusTask) Run(i *Instance) {
if info, err := GetDaemonInfo(i); err == nil {
if info.Swarm.LocalNodeState != swarm.LocalNodeStateInactive && info.Swarm.LocalNodeState != swarm.LocalNodeStateLocked {
i.IsManager = &info.Swarm.ControlAvailable
} else {
i.IsManager = nil
}
}