# Restart worker deployment and wait until ready. function workerRestart() { k3sRun rollout restart deployment/"$workerKube" || return 1 k3sRun rollout status deployment/"$workerKube" --timeout=180s } # Pause the worker agent via control file. function workerAgentStop() { printf '%s\n%s\n%s\n' "action=pause" "status=$taskStatusExecution" "start=$(date +%s)" > "$workerTasksPath/pause.task" || { appError "Failed to write pause task: $workerTasksPath/pause.task" return 1 } } # Remove pause flag for the worker agent. function workerAgentStart() { rm -f "$workerTasksPath/pause.task" }