1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-10-05 01:43:22 +08:00

Delete zombie sessions and instances (#71)

This commit is contained in:
Jonathan Leibiusky
2016-12-17 12:48:15 -08:00
committed by Marcos Nils
parent 93226e30ff
commit 54045d02f6
7 changed files with 65 additions and 33 deletions

View File

@@ -5,11 +5,13 @@ import "log"
type checkSwarmUsedPortsTask struct {
}
func (c checkSwarmUsedPortsTask) Run(i *Instance) {
func (c checkSwarmUsedPortsTask) Run(i *Instance) error {
if i.IsManager != nil && *i.IsManager {
// This is a swarm manager instance, then check for ports
if err := SetInstanceSwarmPorts(i); err != nil {
log.Println(err)
return err
}
}
return nil
}