Merge lp:~julian-edwards/launchpad/suspend-running-jobs-bug-788612 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Aaron Bentley |
Approved revision: | no longer in the source branch. |
Merged at revision: | 13128 |
Proposed branch: | lp:~julian-edwards/launchpad/suspend-running-jobs-bug-788612 |
Merge into: | lp:launchpad |
Diff against target: |
113 lines (+28/-2) 5 files modified
lib/lp/services/job/interfaces/job.py (+6/-0) lib/lp/services/job/model/job.py (+1/-0) lib/lp/services/job/runner.py (+5/-0) lib/lp/services/job/tests/test_job.py (+3/-2) lib/lp/services/job/tests/test_runner.py (+13/-0) |
To merge this branch: | bzr merge lp:~julian-edwards/launchpad/suspend-running-jobs-bug-788612 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aaron Bentley (community) | Approve | ||
Review via email: mp+62494@code.launchpad.net |
Commit message
[r=abentley][bug=788612] Allow running Jobs to suspend themselves
Description of the change
= Summary =
Allow running Jobs to suspend themselves.
== Pre-implementation notes ==
Talked to Aaron and we agreed this strategy.
== Implementation details ==
There's a new exception SuspendJobError defined in interfaces/job.py which any job can raise. It is caught in the main runner code which will subsequently change the job's status to SUSPENDED.
== Tests ==
bin/test -cvv test_runner test_runJob_
== Demo and Q/A ==
n/a
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
I think SuspendJobError is one of those exceptions that's not actually an error, but no need to bikeshed on the name.