Part of lp.code.interfaces.codeimportmachine View In Hierarchy
| 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. |
Should we look for a job to run on this machine?
There are three reasons we might not look for a job:
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.
Set state to OFFLINE, and record the corresponding event.
| Parameters | reason | CodeImportMachineOfflineReason enum value. |
| user | Person that requested going online if done by a user. | |
| message | User-provided message. |