Part of lp.code.interfaces.codeimportevent View In Hierarchy
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. |
CodeImportEvent
objects associated to a CodeImport.CodeImport
object.
Should only be called by CodeImportSet.new.
Parameters | code_import | Newly created CodeImport object. |
user | User that created the object, usually the view's user. | |
Returns | CodeImportEvent with type CREATE. |
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.
Parameters | code_import | CodeImport that will be modified. |
Returns | CodeImportEventToken to pass to newModify . |
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.
Parameters | code_import | Modified CodeImport . |
person | Person who requested the change. | |
token | CodeImportEventToken created by beginModify . | |
Returns | CodeImportEvent of MODIFY type, or None. |
Only called by CodeImportJobWorkflow.requestJob
.
Parameters | code_import | CodeImport for which an immediate run was
requested. |
person | Person who requested the code import to run. | |
Returns | CodeImportEvent of REQUEST type. |
Parameters | machine | CodeImportMachine whose state changed to ONLINE. |
user | Person that requested going online if done by a user. | |
message | User-provided message. | |
Returns | CodeImportEvent of ONLINE type. |
Parameters | machine | CodeImportMachine whose state changed to OFFLINE. |
reason | CodeImportMachineOfflineReason enum value. | |
user | Person that requested going offline if done by a user. | |
message | User-provided message. | |
Returns | CodeImportEvent of OFFLINE type. |
Parameters | machine | CodeImportMachine whose state changed to QUIESCING. |
user | Person that requested quiescing. | |
message | User-provided message. | |
Returns | CodeImportEvent of QUIESCE type. |
Parameters | code_import | The CodeImport which is about to be worked on. |
machine | CodeImportMachine which is about to start the job. | |
Returns | CodeImportEvent of START type. |
Parameters | code_import | The CodeImport which is no longer being worked
on. |
machine | CodeImportMachine which is no longer working on this
import. | |
Returns | CodeImportEvent of FINISH type. |
Parameters | code_import | The CodeImport killed job was working on. |
machine | CodeImportMachine on which the job was running. | |
Returns | CodeImportEvent of KILL type. |
Parameters | code_import | The CodeImport killed job was working on. |
machine | CodeImportMachine on which the job was running. | |
job_id | The database id of the reclaimed job. | |
Returns | CodeImportEvent of RECLAIM type. |