[ADD] add failed build data deletion

This commit is contained in:
zhoujunhao 2018-06-15 10:18:31 +08:00
parent 54ad37399d
commit 7375c03c2e
2 changed files with 4 additions and 35 deletions

View File

@ -89,6 +89,10 @@ func (t *tenantServiceResource) DeleteResources() error {
}
}
} else {
if err := db.GetManager().VersionInfoDao().DeleteVersionInfo(v); err != nil {
return err
}
}
}

View File

@ -1,35 +0,0 @@
package clean
//type TestManager struct {
// ctx context.Context
// kubeclient *kubernetes.Clientset
// waiting []Resource
// queryResource []func(*Manager) []Resource
// cancel context.CancelFunc
// //l list.List
// //dclient *client.Client
//}
//func TestNewManager(t *testing.T) (*Manager, error) {
// c, err := clientcmd.BuildConfigFromFlags("", "../../../test/admin.kubeconfig")
// if err != nil {
// logrus.Error("read kube config file error.", err)
// return nil,err
// }
// clientset, err := kubernetes.NewForConfig(c)
// if err != nil {
// logrus.Error("create kube api client error", err)
// return nil,err
// }
// ctx, cancel := context.WithCancel(context.Background())
// defer cancel()
// m := &Manager{
// ctx: ctx,
// kubeclient: clientset,
// cancel: cancel,
//
// }
// m.CollectingTasks()
// return m,nil
//}