#!/usr/bin/env python
from ecf import *
def family_limit(): return (
Family("lim1").add(
Inlimit("limits:total"),
Family("limits").add(
Defstatus("complete"),
Limits({"total": 15,
"prio": 10,
"other": 20})),
Family("prio").add( # top submitted first
Inlimit("limits:prio"),
[Family("%03d" % step).add(
Task("process"), Edit(STEP=step))
for step in xrange(0, 120+1, 3)]),
Family("side").add( # take remaning tokens
Inlimit("limits:other"),
[Family("%03d" % step).add(
Task("process"), Edit(STEP=step))
for step in xrange(0, 120, 3)])))
|