#!Jinja2
[cylc]
   [[reference test]]
       required run mode = live
       live mode suite timeout = PT2M
[scheduling]
    [[ queues ]]
        [[[ q_fam ]]]
            limit = {{q_size}} # allow testing with various queue sizes
            members = monitor, FAM
    [[dependencies]]
        graph = monitor:start => FAM
[runtime]
    [[FAM]]
        script = sleep 10
    [[a,b,c,d,e,f,g,h,i,j,k,l]]
        inherit = FAM
    [[monitor]]
        script = """
        N_SUCCEDED=0
        while ((N_SUCCEDED < 12)); do
            sleep 1
            N_RUNNING=$(cylc suite-state $CYLC_SUITE_NAME -S running | wc -l)
            ((N_RUNNING <= {{q_size}})) # check
            N_SUCCEDED=$(cylc suite-state $CYLC_SUITE_NAME -S succeeded | wc -l)
        done
"""
