Don't panic when docker client cannot be obtained.

Make close session faster by deleting instances in parallel.
This commit is contained in:
Jonathan Leibiusky @xetorthio
2017-08-11 09:49:19 -03:00
parent 0bc0342399
commit 7f17a7e21d
3 changed files with 41 additions and 18 deletions

View File

@@ -114,14 +114,6 @@ func (p *pwd) getProvisioner(t string) (provisioner.ProvisionerApi, error) {
}
}
func (p *pwd) docker(sessionId string) docker.DockerApi {
d, err := p.dockerFactory.GetForSession(sessionId)
if err != nil {
panic("Should not have got here. Session always need to be validated before calling this.")
}
return d
}
func (p *pwd) setGauges() {
s, _ := p.storage.SessionCount()
ses := float64(s)