Example #1
0
 def start_all(self,roles,expire=False,state=WAITING,ttl=None):
     while True:
         if expire:
             self.expire()
         r = self.start_next(roles,state=state,ttl=ttl)
         if not isok(r):
             return
         job = r.json()
         yield job
Example #2
0
 def expire(self):
     r = requests.delete(self.api('/expire'))
     if not isok(r):
         return 0
     return r.json()['expired']