feat: call scheduler-retire when destroying an app

This helps ensure we don't keep around old containers related to a given app.
This commit is contained in:
Jose Diaz-Gonzalez
2021-08-08 03:04:50 -04:00
parent 9e18736475
commit 72eb61d1fc

View File

@@ -72,6 +72,11 @@ func destroyApp(appName string) error {
forceCleanup := true
common.DockerCleanup(appName, forceCleanup)
common.LogInfo1("Retiring old containers and images")
if err := common.PlugnTrigger("scheduler-retire", []string{scheduler, appName}...); err != nil {
return err
}
// remove contents for apps that are symlinks to other folders
if err := os.RemoveAll(fmt.Sprintf("%v/", common.AppRoot(appName))); err != nil {
common.LogWarn(err.Error())