app/soc/cron/job.py
changeset 2246 c29272f640b0
parent 2244 96d8083cf974
child 2247 64968b86b07c
--- a/app/soc/cron/job.py	Sun Apr 19 17:42:27 2009 +0000
+++ b/app/soc/cron/job.py	Sun Apr 19 17:42:44 2009 +0000
@@ -185,5 +185,13 @@
       db.run_in_transaction(self.failJob, job_key)
       return self.ERRORED
 
+  def iterate(self, jobs, retry_jobs):
+    """Trivial iterator that iterates over jobs then retry_jobs
+    """
+
+    for job in jobs:
+      yield job
+    while retry_jobs:
+      yield retry_jobs[0]
 
 handler = Handler()