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

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

A machine that can perform imports.
Int id Undocumented
Choice state The state of the controller daemon on this machine.
TextLine hostname The hostname of the machine.
Attribute current_jobs The current jobs that the machine is processing.
Attribute events The events associated with this machine.
Datetime date_created Undocumented
Datetime heartbeat When the controller deamon last recorded it was running.
Method shouldLookForJob Should we look for a job to run on this machine?
Method setOnline Record that the machine is online, marking it ready to accept jobs.
Method setOffline Record that the machine is offline.
Method setQuiescing Initiate an orderly shut down without interrupting running jobs.
id =
Undocumented
state =
The state of the controller daemon on this machine.
hostname =
The hostname of the machine.
current_jobs =
The current jobs that the machine is processing.
events =
The events associated with this machine.
date_created =
Undocumented
heartbeat =
When the controller deamon last recorded it was running.
def shouldLookForJob(worker_limit):

Should we look for a job to run on this machine?

There are three reasons we might not look for a job:

  1. The machine is OFFLINE
  2. The machine is QUIESCING (in which case we might go OFFLINE)
  3. There are already enough jobs running on this machine.
def setOnline(user=None, message=None):
Record that the machine is online, marking it ready to accept jobs.

Set state to ONLINE, and record the corresponding event. :param user: Person that requested going online if done by a user. :param message: User-provided message.

def setOffline(reason, user=None, message=None):
Record that the machine is offline.

Set state to OFFLINE, and record the corresponding event.

ParametersreasonCodeImportMachineOfflineReason enum value.
userPerson that requested going online if done by a user.
messageUser-provided message.
def setQuiescing(user, message=None):
Initiate an orderly shut down without interrupting running jobs.

Set state to QUIESCING, and record the corresponding event.

ParametersuserPerson that requested the machine to quiesce.
messageUser-provided message.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.