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:
committed by
Marcos Nils
parent
93226e30ff
commit
54045d02f6
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user