Skip to content

Commit

Permalink
fixed #8 change alias to name in scheduler.patch for the python advan…
Browse files Browse the repository at this point in the history
…ced scheduler patch
  • Loading branch information
Allen Sanabria committed Mar 11, 2014
1 parent c1cc035 commit e68e694
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions conf/patches/scheduler.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
return inner

- def get_jobs(self):
+ def get_jobs(self, alias=None):
+ def get_jobs(self, name=None):
"""
Returns a list of all scheduled jobs.

Expand All @@ -15,12 +15,12 @@
jobs = []
- for jobstore in itervalues(self._jobstores):
- jobs.extend(jobstore.jobs)
+ if not alias:
+ if not name:
+ for jobstore in itervalues(self._jobstores):
+ jobs.extend(jobstore.jobs)
+ else:
+ if alias in self._jobstores:
+ jobs.extend(self._jobstores[alias].jobs)
+ if name in self._jobstores:
+ jobs.extend(self._jobstores[name].jobs)
return jobs
finally:
self._jobstores_lock.release()

0 comments on commit e68e694

Please sign in to comment.