refactor: migrate DOKKU_DOCKER_STOP_TIMEOUT to ps setting

This commit is contained in:
Jose Diaz-Gonzalez
2025-03-09 04:26:47 -04:00
parent 758d9f8a83
commit 9beab4d50d
11 changed files with 131 additions and 21 deletions

View File

@@ -114,7 +114,7 @@ fn-scheduler-docker-local-retire-container() {
return
fi
DOKKU_DOCKER_STOP_TIMEOUT="$(config_get "$APP" DOKKU_DOCKER_STOP_TIMEOUT || true)"
DOKKU_DOCKER_STOP_TIMEOUT="$(plugn trigger ps-get-property "$APP" stop-timeout || true)"
[[ $DOKKU_DOCKER_STOP_TIMEOUT ]] && DOCKER_STOP_TIME_ARG="--time=${DOKKU_DOCKER_STOP_TIMEOUT}"
if [[ "$STATE" == "restarting" ]]; then

View File

@@ -32,7 +32,7 @@ trigger-scheduler-docker-local-scheduler-deploy() {
local oldids=$(get_app_container_ids "$APP" "$PROCESS_TYPE")
DOKKU_NETWORK_BIND_ALL="$(plugn trigger network-get-property "$APP" bind-all-interfaces)"
DOKKU_DOCKER_STOP_TIMEOUT="$(config_get "$APP" DOKKU_DOCKER_STOP_TIMEOUT || true)"
DOKKU_DOCKER_STOP_TIMEOUT="$(plugn trigger ps-get-property "$APP" stop-timeout)"
[[ $DOKKU_DOCKER_STOP_TIMEOUT ]] && DOCKER_STOP_TIME_ARG="--time=${DOKKU_DOCKER_STOP_TIMEOUT}"
DOKKU_START_CMD="$(config_get "$APP" DOKKU_START_CMD || true)"

View File

@@ -51,7 +51,7 @@ trigger-scheduler-docker-local-scheduler-run-stop() {
verify_app_name "$APP"
DOKKU_DOCKER_STOP_TIMEOUT="$(config_get "$APP" DOKKU_DOCKER_STOP_TIMEOUT || true)"
DOKKU_DOCKER_STOP_TIMEOUT="$(plugn trigger ps-get-property "$APP" stop-timeout || true)"
if [[ -n "$CONTAINER_NAME" ]]; then
fn-scheduler-docker-local-stop-container "$CONTAINER_NAME" "$DOKKU_DOCKER_STOP_TIMEOUT"
return $?