
title = "gcylc task state color theme demo"
description = """Generate a lot of possible task states,
to show what they look like live in gcylc."""

[scheduling]
    initial cycle point = 20120808T00
    final cycle point = 20120812T00
    [[queues]]
        # Use internal queues to see tasks in the "queued" state
        [[[fam_queue]]]
            limit = 2
            members = FAMILY
    [[dependencies]]
        [[[R1]]]
            graph = cfoo => foo
        [[[T00]]]
            graph =  """
    foo[-P1D] => foo => FAMILY
    FAMILY:finish-all => bar
    foo => bad & bad2 & bad_good
    bar => !bad & !bad2
                     """

[runtime]
    [[root]]
        # delay all tasks slightly in the 'submitted' state
        init-script = "sleep 5"
    [[FAMILY]]
    [[m1,m2,m3]]
        inherit = FAMILY
    [[m_x]]
        inherit = FAMILY
        title = "this task succeeds on the second try "
        retry delays = PT18S
        script = """
sleep 10
if [[ $CYLC_TASK_TRY_NUMBER < 2 ]]; then
    cylc task message -p WARNING ABORTING
    exit 1
fi"""
    [[bad]]
        title = "A task that tries and fails twice"
        description = """Failed instances of this task are removed from the suite
at the end of each cycle by a suicide trigger."""
        retry delays = PT12S
        script = "sleep 10; exit 1"
    [[bad2]]
        title = "A task that fails to submit twice"
        [[[job]]]
            batch system = fail
            submission retry delays = PT18S
    [[bad_good]]
        title = "A task successfully submits on the second try "
        description = """Uses a retry event handler to broadcast a new job
submission method for the retry."""
        [[[job]]]
            batch system = fail
            submission retry delays = PT18S
        [[[events]]]
            submission retry handler = change-my-job-sub-method.sh
 
[visualization]
    use node color for labels = True
    [[node attributes]]
        FAMILY = "style=filled", "color=#0000aa", "fillcolor=yellow"
