Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Column
Code Block
languagepy
themeEclipse
titleinitial pattern, using three limits
collapsetrue
#!/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 remaaingremaning tokens
          Inlimit("limits:other"),
          [Family("%03d" % step).add(
              Task("process"), Edit(STEP=step)) 
           for step in xrange(0, 120, 3)])))

...