#!Jinja2

title = a suite that logs run, reload, and restart configs
description = the weather is {{WEATHER | default("bad")}}

[cylc]
   [[events]]
      abort on timeout = True
      timeout = PT30S

[scheduling]
   [[dependencies]]
       graph = reloader => restarter
[runtime]
   [[reloader]]
      script = cylc reload $CYLC_SUITE_NAME
   [[restarter]]
      script = """
wait "${CYLC_TASK_MESSAGE_STARTED_PID}"
sleep 5
cylc stop --max-polls=10 --interval=2 --now $CYLC_SUITE_NAME
cylc restart --set WEATHER=good $CYLC_SUITE_NAME
sleep 5
touch $CYLC_SUITE_RUN_DIR/suite-stopping"""
