Part of lp.code.interfaces.webservice View In Hierarchy
Int | id | Undocumented |
Datetime | date_created | Undocumented |
Attribute | target | The branch/repository produced by the import system (VCS-agnostic). |
PublicPersonChoice | registrant | The person who initially requested this import. |
Timedelta | update_interval | The user-specified time between automatic updates of this import. If this is unspecified, the effective update interval is a default value selected by Launchpad administrators. |
Timedelta | effective_update_interval | The effective time between automatic updates of this import. If the user did not specify an update interval, this is a default value selected by Launchpad administrators. |
Method | getImportDetailsForDisplay | Get a one-line summary of the location this import is from. |
Choice | import_job | The current job for this import, either pending or running. |
Attribute | results | The results for this code import. |
Attribute | consecutive_failure_count | How many times in a row this import has failed. |
Method | updateFromData | Modify attributes of the CodeImport . |
Method | tryFailingImportAgain | Try a failing import again. |
Method | requestImport | Request that an import be tried soon. |
CodeImport
.
Creates and returns a MODIFY CodeImportEvent
if changes were made.
This method preserves the invariant that a CodeImportJob
exists for
a given import if and only if its review_status is REVIEWED, creating
and deleting jobs as necessary.
Parameters | data | dictionary whose keys are attribute names and values are attribute values. |
user | user who made the change, to record in the
CodeImportEvent . May be None. | |
Returns | The MODIFY CodeImportEvent , if any changes were made, or
None if no changes were made. |
This method sets the review_status back to REVIEWED and requests the import be attempted as soon as possible.
The import must be in the FAILING state.
Parameters | user | the user who is requesting the import be tried again. |
This method will schedule an import to happen soon for this branch.
The import must be in the Reviewed state, if not then a CodeImportNotInReviewedState error will be thrown. If using the API then a status code of 400 will result.
If the import is already running then a CodeImportAlreadyRunning error will be thrown. If using the API then a status code of 400 will result.
The two cases can be distinguished over the API by seeing if the exception names appear in the body of the response.
If used over the API and the request has already been made then this method will silently do nothing. If called internally then the error_if_already_requested parameter controls whether a CodeImportAlreadyRequested exception will be thrown in that situation.
Returns | None |