Debian Codegraph @

tests/f/restart/20-event-retry/bin/my-handler

raw
1 #!/usr/bin/env bash
2 set -euo pipefail
3 WORKFLOW="$1"
4 OUT_FILE="$CYLC_WORKFLOW_RUN_DIR/file"
5 if grep -q -F '1' "${OUT_FILE}" 2>'/dev/null'; then
6 echo '2' >>"${OUT_FILE}"
7 cylc stop "${WORKFLOW}"
8 exit 0
9 else
10 echo '1' >"${OUT_FILE}"
11 cylc stop --now --now "${WORKFLOW}"
12 exit 1
13 fi