Debian Codegraph @

tests/f/reload/27-stall-retrigger/bin/stall-handler.sh

raw
1 #!/bin/bash
2
3 # Change "script = false" -> "true" in 1/foo, then reload and retrigger it.
4
5 if grep "\[command\] reload_workflow" "${CYLC_WORKFLOW_LOG_DIR}/log" >/dev/null; then
6 # Abort if not the first call (avoid an endless loop if the reload does not
7 # have the intended effect).
8 >&2 echo "ERROR (stall-handler.sh): should only be called once"
9 cylc stop --now --now "${CYLC_WORKFLOW_ID}"
10 exit 1
11 fi
12 sed -i "s/false/true/" "${CYLC_WORKFLOW_RUN_DIR}/suite.rc"
13 cylc reload "${CYLC_WORKFLOW_ID}"
14 cylc trigger "${CYLC_WORKFLOW_ID}//1/foo"