#!Jinja2
[scheduling]
    [[ queues ]]
        [[[ q_fam ]]]
            limit = {{q_size}} # allow testing with various queue sizes
            members = monitor, FAM
    [[graph]]
        R1 = monitor:start => FAM
[runtime]
    [[FAM]]
        script = true
    [[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
"""
