Merge lp:~mwhudson/launchpad/reduce-concurrent-job-count into lp:launchpad
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Michael Hudson-Doyle on 2010-02-22 | ||||
| Approved revision: | not available | ||||
| Merged at revision: | not available | ||||
| Proposed branch: | lp:~mwhudson/launchpad/reduce-concurrent-job-count | ||||
| Merge into: | lp:launchpad | ||||
| Diff against target: |
492 lines (+93/-79) 15 files modified
cronscripts/code-import-dispatcher.py (+8/-1) lib/canonical/config/schema-lazr.conf (+1/-1) lib/lp/code/doc/xmlrpc-codeimport-scheduler.txt (+3/-6) lib/lp/code/interfaces/codeimportjob.py (+1/-1) lib/lp/code/interfaces/codeimportmachine.py (+1/-1) lib/lp/code/interfaces/codeimportscheduler.py (+1/-1) lib/lp/code/model/codeimportjob.py (+2/-2) lib/lp/code/model/codeimportmachine.py (+2/-3) lib/lp/code/model/tests/test_codeimport.py (+1/-1) lib/lp/code/model/tests/test_codeimportjob.py (+3/-3) lib/lp/code/model/tests/test_codeimportmachine.py (+9/-11) lib/lp/code/xmlrpc/codeimportscheduler.py (+3/-2) lib/lp/codehosting/codeimport/dispatcher.py (+4/-2) lib/lp/codehosting/codeimport/tests/test_dispatcher.py (+53/-43) lib/lp/codehosting/codeimport/tests/test_workermonitor.py (+1/-1) |
||||
| To merge this branch: | bzr merge lp:~mwhudson/launchpad/reduce-concurrent-job-count | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Tim Penhey (community) | Approve on 2010-02-22 | ||
| Michael Nelson (community) | code | 2010-02-18 | Needs Information on 2010-02-18 |
|
Review via email:
|
|||
Commit Message
Allow a code import machine to set its own limit for how many jobs to run, and lower the default to 3.
| Michael Hudson-Doyle (mwhudson) wrote : | # |
| Michael Nelson (michael.nelson) wrote : | # |
Hi Michael,
doesn't this need to be a change on the lp-production-
production/
55:max_
| Michael Hudson-Doyle (mwhudson) wrote : | # |
Hm, I don't think that config setting takes effect at the moment. I'll investigate further!
| Michael Hudson-Doyle (mwhudson) wrote : | # |
Yeah, it doesn't apply, so I'll remove it: https:/
| Michael Hudson-Doyle (mwhudson) wrote : | # |
OK, so as discussed in IRC, I've made the worker limit settable on the code-import-
| Tim Penhey (thumper) wrote : | # |
lib/lp/
You have:
if worker_limit is None:
Which doesn't set self.worker_limit if worker_limit is passed in.
if worker_limit is None:
self.
perhaps.
How hard would it be to add an int Option? That way the OptionParser object does the integer validation and conversion for you.
--max-jobs
| Michael Hudson-Doyle (mwhudson) wrote : | # |
Tim,
can you rereview now please?
Cheers,
mwh

As discussed in the linked bug, we should probably do something more sophisticated here to give a machine a reasonable number of jobs to run, but this is much easier for sure.