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
@@ -1,12 +1,18 @@
|
||||
package services
|
||||
|
||||
import "log"
|
||||
|
||||
type checkUsedPortsTask struct {
|
||||
}
|
||||
|
||||
func (c checkUsedPortsTask) Run(i *Instance) {
|
||||
func (c checkUsedPortsTask) Run(i *Instance) error {
|
||||
if ports, err := GetUsedPorts(i); err == nil {
|
||||
for _, p := range ports {
|
||||
i.setUsedPort(p)
|
||||
}
|
||||
} else {
|
||||
log.Println(err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user