#!Jinja2
[cylc]
    [[events]]
        abort on timeout = True
        timeout = PT90S
[scheduling]
    [[dependencies]]
        graph = local-task:echo & remote-task:echo => cat-log
[runtime]
    [[ECHO]]
        script = """
echo rubbish
echo garbage >&2
cylc message 'echo done'
sleep 60"""
        [[[outputs]]]
            echo = "echo done"
    [[local-task]]
        inherit = ECHO
    [[remote-task]]
        inherit = ECHO
        [[[remote]]]
            host={{environ["CYLC_TEST_HOST"]}}
            owner={{environ["CYLC_TEST_OWNER"]}}
    [[cat-log]]
        script = """
sleep 10  # wait for messages for other tasks
for TASK in local-task.1 remote-task.1; do
  cylc cat-log --debug -f o "${CYLC_SUITE_NAME}" $TASK | grep 'rubbish'
  cylc cat-log --debug -f e "${CYLC_SUITE_NAME}" $TASK | grep 'garbage'
done"""
