fix: sync code to bash implementation
This commit is contained in:
@@ -258,17 +258,9 @@ func GetAppImageName(appName, imageTag, imageRepo string) (imageName string) {
|
|||||||
|
|
||||||
// IsDeployed returns true if given app has a running container
|
// IsDeployed returns true if given app has a running container
|
||||||
func IsDeployed(appName string) bool {
|
func IsDeployed(appName string) bool {
|
||||||
files, err := ioutil.ReadDir(AppRoot(appName))
|
scheduler := GetAppScheduler(appName)
|
||||||
if err != nil {
|
_, err := PlugnTriggerOutput("scheduler-is-deployed", []string{scheduler, appName}...)
|
||||||
return false
|
return err == nil
|
||||||
}
|
|
||||||
|
|
||||||
for _, f := range files {
|
|
||||||
if f.Name() == "CONTAINER" || strings.HasPrefix(f.Name(), "CONTAINER.") {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MustGetEnv returns env variable or fails if it's not set
|
// MustGetEnv returns env variable or fails if it's not set
|
||||||
|
|||||||
Reference in New Issue
Block a user