Merge lp:~abentley/launchpad/celery-job-feature-flag into lp:launchpad
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Graham Binns on 2012-04-03 | ||||
| Approved revision: | no longer in the source branch. | ||||
| Merged at revision: | 15057 | ||||
| Proposed branch: | lp:~abentley/launchpad/celery-job-feature-flag | ||||
| Merge into: | lp:launchpad | ||||
| Diff against target: |
268 lines (+130/-2) 6 files modified
lib/lp/code/model/branch.py (+11/-2) lib/lp/code/model/tests/test_branch.py (+53/-0) lib/lp/services/features/flags.py (+6/-0) lib/lp/services/job/runner.py (+15/-0) lib/lp/services/job/tests/test_celeryjob.py (+14/-0) lib/lp/services/job/tests/test_runner.py (+31/-0) |
||||
| To merge this branch: | bzr merge lp:~abentley/launchpad/celery-job-feature-flag | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Graham Binns (community) | code | 2012-04-03 | Approve on 2012-04-03 |
|
Review via email:
|
|||
Commit Message
Control running jobs via Celery with feature flag.
Description of the Change
= Summary =
Fix 972098: celery RabbitMQ queue slowly increasing on ackee
== Proposed fix ==
Implement a feature flag to control which kinds of jobs run via Celery, so that none will run by default.
== Pre-implementation notes ==
Discussed with deryck
== Implementation details ==
jobs.celery.
In order to test that branchChanged was honouring the flag, we needed to test it specifically. But that didn't provide a way to get the Celery response, so that we could call response.wait. So I implemented monitor_celery, to provide the responses. This implementation also ensures that if responses will not be used, they are not sent in the first place.
== Tests ==
bin/test -t TestBranchJobVi
== Demo and Q/A ==
Have webops determine the length of the "celery" RabbitMQ queue. Push a new branch. Have webops determine the length of the "celery" RabbitMQ queue. The length should not have changed.
= 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/
