fix: use updated fn-ps-is-app-running function to determine an application's status
In some cases, a single allocation for a service may not be running, but the others will, and `is_app_running` will return the wrong thing. Closes #2772
This commit is contained in:
@@ -91,10 +91,17 @@ ps_start() {
|
|||||||
declare desc="starts app"
|
declare desc="starts app"
|
||||||
local APP="$1"; verify_app_name "$APP"
|
local APP="$1"; verify_app_name "$APP"
|
||||||
local IMAGE_TAG=$(get_running_image_tag "$APP");
|
local IMAGE_TAG=$(get_running_image_tag "$APP");
|
||||||
|
local RUNNING
|
||||||
|
|
||||||
if (is_deployed "$APP"); then
|
if (is_deployed "$APP"); then
|
||||||
plugn trigger pre-start "$APP"
|
plugn trigger pre-start "$APP"
|
||||||
if ! (is_app_running "$APP"); then
|
RUNNING="$(fn-ps-is-app-running "$APP")"
|
||||||
|
|
||||||
|
if [[ "$RUNNING" == "mixed" ]]; then
|
||||||
|
dokku_log_warn "App is running in mixed mode, releasing"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$RUNNING" != "true" ]]; then
|
||||||
release_and_deploy "$APP" "$IMAGE_TAG"
|
release_and_deploy "$APP" "$IMAGE_TAG"
|
||||||
else
|
else
|
||||||
dokku_log_warn "App $APP already running"
|
dokku_log_warn "App $APP already running"
|
||||||
|
|||||||
Reference in New Issue
Block a user