l.c.i.c.ICodeImportScheduler(Interface) : interface documentation

Part of lp.code.interfaces.codeimportscheduler View In Hierarchy

The code import scheduler.

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.
def getJobForMachine(hostname, worker_limit):
Get a job to run on the slave 'hostname'.

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.

def getImportDataForJobID(job_id):
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.
def updateHeartbeat(job_id, log_tail):
Call ICodeImportJobWorkflow.updateHeartbeat for job job_id.
RaisesNoSuchCodeImportJobif no job with id job_id exists.
def finishJobID(job_id, status_name, log_file_alias_url):
Call ICodeImportJobWorkflow.finishJob for job job_id.
RaisesNoSuchCodeImportJobif no job with id job_id exists.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.