forked from SteelHouseLabs/vFense
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Allen Sanabria
committed
Mar 4, 2014
1 parent
404a0d5
commit 96e6f2f
Showing
3 changed files
with
40 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- /usr/local/lib/python2.7/dist-packages/apscheduler/scheduler.py 2014-03-04 13:21:25.860390442 -0800 | ||
+++ mod_scheduler.py 2014-03-04 13:20:42.180389130 -0800 | ||
@@ -406,7 +406,7 @@ | ||
return func | ||
return inner | ||
|
||
- def get_jobs(self): | ||
+ def get_jobs(self, alias=None): | ||
""" | ||
Returns a list of all scheduled jobs. | ||
|
||
@@ -415,8 +415,12 @@ | ||
self._jobstores_lock.acquire() | ||
try: | ||
jobs = [] | ||
- for jobstore in itervalues(self._jobstores): | ||
- jobs.extend(jobstore.jobs) | ||
+ if not alias: | ||
+ for jobstore in itervalues(self._jobstores): | ||
+ jobs.extend(jobstore.jobs) | ||
+ else: | ||
+ if alias in self._jobstores: | ||
+ jobs.extend(self._jobstores[alias].jobs) | ||
return jobs | ||
finally: | ||
self._jobstores_lock.release() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters