From bb9f764b9fd870a53763ff38d96da7e5e1464e63 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 17 Nov 2020 03:28:03 -0500 Subject: [PATCH] fix: sync code to bash implementation --- plugins/common/common.go | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/plugins/common/common.go b/plugins/common/common.go index be763e55a..a211d228c 100644 --- a/plugins/common/common.go +++ b/plugins/common/common.go @@ -258,17 +258,9 @@ func GetAppImageName(appName, imageTag, imageRepo string) (imageName string) { // IsDeployed returns true if given app has a running container func IsDeployed(appName string) bool { - files, err := ioutil.ReadDir(AppRoot(appName)) - if err != nil { - return false - } - - for _, f := range files { - if f.Name() == "CONTAINER" || strings.HasPrefix(f.Name(), "CONTAINER.") { - return true - } - } - return false + scheduler := GetAppScheduler(appName) + _, err := PlugnTriggerOutput("scheduler-is-deployed", []string{scheduler, appName}...) + return err == nil } // MustGetEnv returns env variable or fails if it's not set