Fix cleanup on duplicate function specialization

This commit is contained in:
Soam Vasani
2016-12-10 19:55:20 -08:00
parent ddb189bda2
commit f29e69c581
+3 -1
View File
@@ -443,7 +443,9 @@ func (gp *GenericPool) GetFuncSvc(m *fission.Metadata) (*funcSvc, error) {
// our own. TODO: this is grossly inefficient, improve it with some sort of state
// machine
log.Printf("func svc already exists: %v", existingFsvc.podName)
go gp.CleanupFunctionService(fsvc.podName)
go func() {
gp.kubernetesClient.Core().Pods(gp.namespace).Delete(fsvc.podName, nil)
}()
return existingFsvc, nil
}
return fsvc, nil