From 72eb61d1fcb48c9b6681f5abecde197f8dbb99b1 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 8 Aug 2021 03:04:50 -0400 Subject: [PATCH] feat: call scheduler-retire when destroying an app This helps ensure we don't keep around old containers related to a given app. --- plugins/apps/functions.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/apps/functions.go b/plugins/apps/functions.go index 8ff1dc541..492ddb448 100644 --- a/plugins/apps/functions.go +++ b/plugins/apps/functions.go @@ -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())