Merge lp:~abentley/launchpad/simplify-twisted-runner-3 into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 13943 | ||||
Proposed branch: | lp:~abentley/launchpad/simplify-twisted-runner-3 | ||||
Merge into: | lp:launchpad | ||||
Prerequisite: | lp:~abentley/launchpad/simplify-twisted-runner-2 | ||||
Diff against target: |
83 lines (+23/-14) 1 file modified
lib/lp/services/job/runner.py (+23/-14) |
||||
To merge this branch: | bzr merge lp:~abentley/launchpad/simplify-twisted-runner-3 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | code | Approve | |
Review via email: mp+74868@code.launchpad.net |
Commit message
Inject sys.path into subprocesses.
Description of the change
= Summary =
Fix issues invoking TwistedJobRunner
== Proposed fix ==
Inject the current sys.path into subprocesses as PYTHONPATH
== Pre-implementation notes ==
None
== Implementation details ==
This builds on previous work toward simplifying the TwistedJobRunner.
It fixes issues finding and launching the JobRunnerProcess class by injecting the current sys.path into subprocesses as PYTHONPATH.
It also simplifies the code further by using the inclineCallbacks decorator.
It also improves handling of process startup failures by handling the case when result is None.
It also outputs 'No jobs to run.' if no jobs were found, to clarify output.
It also raises 'Could not acquire lease...' to an INFO message, so that it's at the same level as 'Running ...' messages.
== Tests ==
bin/test test_runner
== Demo and Q/A ==
Create a branch and run cronscripts/
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
Looks great Aaron.