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

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

The set of all CodeImportEvent objects.
Method getAll Iterate over all CodeImportEvent objects.
Method getEventsForCodeImport Iterate over CodeImportEvent objects associated to a CodeImport.
Method newCreate Record the creation of a CodeImport object.
Method beginModify Create the token to give to newModify.
Method newModify Record a modification to a CodeImport object.
Method newRequest Record that user requested an immediate run of this import.
Method newOnline Record that an import machine went online.
Method newOffline Record that an import machine went offline.
Method newQuiesce Record that user requested the machine to quiesce for maintenance.
Method newStart Record that a machine is about to start working on a code import.
Method newFinish Record that a machine has finished working on a code import.
Method newKill Record that a code import job was killed.
Method newReclaim Record that a code import job was reclaimed by the watchdog.
def getAll():
Iterate over all CodeImportEvent objects.

For use only in tests.

def getEventsForCodeImport(code_import):
Iterate over CodeImportEvent objects associated to a CodeImport.
def newCreate(code_import, person):
Record the creation of a CodeImport object.

Should only be called by CodeImportSet.new.

Parameterscode_importNewly created CodeImport object.
userUser that created the object, usually the view's user.
ReturnsCodeImportEvent with type CREATE.
def beginModify(code_import):
Create the token to give to newModify.

Should only be called by CodeImport methods.

The token records the state of the code import before modification, it lets newModify find what changes were done.

Parameterscode_importCodeImport that will be modified.
ReturnsCodeImportEventToken to pass to newModify.
def newModify(code_import, person, token):
Record a modification to a CodeImport object.

Should only be called by CodeImport methods.

If no change is found between the code import and the data saved in the token, the modification is considered non-significant and no event object is created.

Parameterscode_importModified CodeImport.
personPerson who requested the change.
tokenCodeImportEventToken created by beginModify.
ReturnsCodeImportEvent of MODIFY type, or None.
def newRequest(code_import, person):
Record that user requested an immediate run of this import.

Only called by CodeImportJobWorkflow.requestJob.

Parameterscode_importCodeImport for which an immediate run was requested.
personPerson who requested the code import to run.
ReturnsCodeImportEvent of REQUEST type.
def newOnline(machine, user=None, message=None):
Record that an import machine went online.
ParametersmachineCodeImportMachine whose state changed to ONLINE.
userPerson that requested going online if done by a user.
messageUser-provided message.
ReturnsCodeImportEvent of ONLINE type.
def newOffline(machine, reason, user=None, message=None):
Record that an import machine went offline.
ParametersmachineCodeImportMachine whose state changed to OFFLINE.
reasonCodeImportMachineOfflineReason enum value.
userPerson that requested going offline if done by a user.
messageUser-provided message.
ReturnsCodeImportEvent of OFFLINE type.
def newQuiesce(machine, user, message=None):
Record that user requested the machine to quiesce for maintenance.
ParametersmachineCodeImportMachine whose state changed to QUIESCING.
userPerson that requested quiescing.
messageUser-provided message.
ReturnsCodeImportEvent of QUIESCE type.
def newStart(code_import, machine):
Record that a machine is about to start working on a code import.
Parameterscode_importThe CodeImport which is about to be worked on.
machineCodeImportMachine which is about to start the job.
ReturnsCodeImportEvent of START type.
def newFinish(code_import, machine):
Record that a machine has finished working on a code import.
Parameterscode_importThe CodeImport which is no longer being worked on.
machineCodeImportMachine which is no longer working on this import.
ReturnsCodeImportEvent of FINISH type.
def newKill(code_import, machine):
Record that a code import job was killed.
Parameterscode_importThe CodeImport killed job was working on.
machineCodeImportMachine on which the job was running.
ReturnsCodeImportEvent of KILL type.
def newReclaim(code_import, machine, job_id):
Record that a code import job was reclaimed by the watchdog.
Parameterscode_importThe CodeImport killed job was working on.
machineCodeImportMachine on which the job was running.
job_idThe database id of the reclaimed job.
ReturnsCodeImportEvent of RECLAIM type.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.