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:
@@ -72,6 +72,11 @@ func destroyApp(appName string) error {
|
|||||||
forceCleanup := true
|
forceCleanup := true
|
||||||
common.DockerCleanup(appName, forceCleanup)
|
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
|
// remove contents for apps that are symlinks to other folders
|
||||||
if err := os.RemoveAll(fmt.Sprintf("%v/", common.AppRoot(appName))); err != nil {
|
if err := os.RemoveAll(fmt.Sprintf("%v/", common.AppRoot(appName))); err != nil {
|
||||||
common.LogWarn(err.Error())
|
common.LogWarn(err.Error())
|
||||||
|
|||||||
Reference in New Issue
Block a user