process-job-source-groups.py will starve itself if run with multiple overlapping schedules
Bug #839659 reported by
Gavin Panella
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Low
|
Colin Watson |
Bug Description
For bug 770721 I planned to add a new FREQUENT job source group and
schedule it to run every minute. The current MAIN group is run every 5
minutes. However, process-
lock file - /var/lock/
five minutes there will be a race to the lock.
process-
after the group it is attempting to run. (In which case it ought to be
limited to a single group at a time so it doesn't have to create
multiple lock files too.)
Related branches
lp:~cjwatson/launchpad/process-job-source-groups-locking
- Benji York (community): Approve (code)
-
Diff: 53 lines (+9/-9)2 files modifiedcronscripts/process-job-source-groups.py (+3/-1)
lib/lp/registry/tests/test_process_job_sources_cronjob.py (+6/-8)
Changed in launchpad: | |
status: | Triaged → In Progress |
assignee: | nobody → Colin Watson (cjwatson) |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Is there any reason this script needs to take a lock at all? All it's doing is looking up bits in config, and then running process- job-source. py for each one - and that script takes its own locks. I can't see how just deleting the locking from process- job-source- groups. py would cause any trouble.
If this approach sounds sensible, then I have a patch, since I'm thinking of adding a new FREQUENT job.