mirror of
https://github.com/dokku/dokku.git
synced 2026-08-29 10:08:53 +02:00
The bare `init-process` and `parallel-schedule-count` keys previously returned the computed value, so external tooling could not tell whether a property had been set on the app or was merely defaulting. Both properties are now also configurable with `--global`, the report exposes `computed-*` and `global-*` keys alongside the bare raw keys, and the deploy path honors the global value before falling back to the linuxserver.io vendor heuristic.
31 lines
1.1 KiB
Bash
Executable File
31 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
|
set -eo pipefail
|
|
[[ $DOKKU_TRACE ]] && set -x
|
|
|
|
cmd-scheduler-docker-local-set() {
|
|
declare desc="set or clear a scheduler-docker-local property for an app or globally"
|
|
declare cmd="scheduler-docker-local:set"
|
|
[[ "$1" == "$cmd" ]] && shift 1
|
|
declare APP="$1" KEY="$2" VALUE="$3"
|
|
local VALID_KEYS=("init-process" "parallel-schedule-count")
|
|
[[ "$APP" == "--global" ]] || verify_app_name "$APP"
|
|
|
|
[[ -z "$KEY" ]] && dokku_log_fail "No key specified"
|
|
|
|
if ! fn-in-array "$KEY" "${VALID_KEYS[@]}"; then
|
|
dokku_log_fail "Invalid key specified, valid keys include: init-process, parallel-schedule-count"
|
|
fi
|
|
|
|
if [[ -n "$VALUE" ]]; then
|
|
dokku_log_info2_quiet "Setting ${KEY} to ${VALUE}"
|
|
fn-plugin-property-write "scheduler-docker-local" "$APP" "$KEY" "$VALUE"
|
|
else
|
|
dokku_log_info2_quiet "Unsetting ${KEY}"
|
|
fn-plugin-property-delete "scheduler-docker-local" "$APP" "$KEY"
|
|
fi
|
|
}
|
|
|
|
cmd-scheduler-docker-local-set "$@"
|