Ampoule job runner should not run in launchpad environment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Unassigned |
Bug Description
The ampoule-based job runner is slower than the synchronous job runner because it needs to start up two launchpad environments-- one for the master process and one for the subprocess.
Instead, the ampoule-based job runner should defer all work that requires a launchpad environment to the subprocess.
Currently, two significant operations require a launchpad environment:
1. Finding available jobs to run
2. Reporting oopses when a job terminates uncleanly
Since our ampoule-based job running script may become a daemon, the master process should be as simple as possible. By shoving all this work into subprocesses, we reduce the scope for resource leaks and abnormal termination in the master process. Child processes can, of course, be killed.
By "start up two launchpad environments", I presume you mean "process launchpad's zcml"?
Why not have all the Launchpad stuff done in the job runner, leaving the subprocess nice and fast to start?