Part of lp.code.interfaces.codeimportscheduler View In Hierarchy
The code import scheduler is responsible for allocating import jobs to machines. Code import slave machines call the getJobForMachine() method when they need more work to do.
Method | getJobForMachine | Get a job to run on the slave 'hostname'. |
Method | getImportDataForJobID | Get data about the import with job id job_id . |
Method | updateHeartbeat | Call ICodeImportJobWorkflow.updateHeartbeat for job job_id . |
Method | finishJobID | Call ICodeImportJobWorkflow.finishJob for job job_id . |
This method selects the most appropriate job for the machine, mark it as having started on said machine and return its id, or 0 if there are no jobs pending.
Get data about the import with job id `job_id`. :return: ``(worker_arguments, target_url, log_file_name)`` where: * ``worker_arguments`` are the arguments to pass to the code import worker subprocess * ``target_url`` is the URL of the import branch/repository (only used in OOPS reports) * ``log_file_name`` is the name of the log file to create in the librarian. :raise NoSuchCodeImportJob: if no job with id `job_id` exists.
ICodeImportJobWorkflow.updateHeartbeat
for job job_id
.Raises | NoSuchCodeImportJob | if no job with id job_id exists. |
ICodeImportJobWorkflow.finishJob
for job job_id
.Raises | NoSuchCodeImportJob | if no job with id job_id exists. |