Merge lp:~abentley/launchpad/celery-everywhere-5 into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Aaron Bentley on 2012-04-23 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 15146 |
| Proposed branch: | lp:~abentley/launchpad/celery-everywhere-5 |
| Merge into: | lp:launchpad |
| Prerequisite: | lp:~abentley/launchpad/celery-everywhere-4 |
| Diff against target: |
198 lines (+66/-13) 5 files modified
lib/lp/bugs/model/apportjob.py (+14/-2) lib/lp/bugs/tests/test_apportjob.py (+26/-5) lib/lp/services/job/model/job.py (+3/-1) lib/lp/services/job/tests/__init__.py (+18/-4) lib/lp/testing/factory.py (+5/-1) |
| To merge this branch: | bzr merge lp:~abentley/launchpad/celery-everywhere-5 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Benji York (community) | code | 2012-04-23 | Approve on 2012-04-23 |
|
Review via email:
|
|||
Commit Message
Support running ApportJobs via Celery
Description of the Change
= Summary =
Support running ApportJobs via Celery
== Pre-implementation notes ==
None
== LOC Rationale ==
Part of a resourced arc that will reduce LOC.
== Implementation details ==
Enhance block_on_job to make test development easier: report oopses and worker-side tracebacks for exceptions.
Enhance LaunchpadObject
Update ApportJob, ApportJobDerived and ProcessApportBl
== Tests ==
bin/test test_apportjob -t TestViaCelery
== Demo and Q/A ==
None
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/

This branch looks good. Things came to mind while reading the diff:
I really like the comments in the tests. I like it when a test fails
and the comments give good context as to what the assertions mean and
why they are important.
In makeBlob, since blob_file isn't used later on in the method, then you
don't have to save a reference to the opened file. I.e., instead of
doing
blob_file = open(blob_path)
blob = blob_file.read()
you can do
blob = open(blob_ path).read( )
That's a small improvement, but it also means that you won't be
redefining blob_file. Make that two small improvements. ;)