l.s.j.i.j.IRunnableJob(IJob) : interface documentation

Part of lp.services.job.interfaces.job View In Hierarchy

Known subclasses: lp.answers.interfaces.questionjob.IQuestionEmailJob, lp.bugs.interfaces.apportjob.IProcessApportBlobJob, lp.code.interfaces.branchjob.IBranchModifiedMailJob, lp.code.interfaces.branchjob.IBranchScanJob, lp.code.interfaces.branchjob.IBranchUpgradeJob, lp.code.interfaces.branchjob.IReclaimBranchSpaceJob, lp.code.interfaces.branchjob.IRevisionMailJob, lp.code.interfaces.branchjob.IRevisionsAddedJob, lp.code.interfaces.branchjob.IRosettaUploadJob, lp.code.interfaces.branchmergeproposal.ICodeReviewCommentEmailJob, lp.code.interfaces.branchmergeproposal.IGenerateIncrementalDiffJob, lp.code.interfaces.branchmergeproposal.IMergeProposalNeedsReviewEmailJob, lp.code.interfaces.branchmergeproposal.IMergeProposalUpdatedEmailJob, lp.code.interfaces.branchmergeproposal.IReviewRequestedEmailJob, lp.code.interfaces.branchmergeproposal.IUpdatePreviewDiffJob, lp.code.interfaces.gitjob.IGitRefScanJob, lp.code.interfaces.gitjob.IGitRepositoryModifiedMailJob, lp.code.interfaces.gitjob.IReclaimGitRepositorySpaceJob, lp.registry.interfaces.persontransferjob.IPersonTransferJob, lp.registry.interfaces.productjob.IProductJob, lp.registry.interfaces.sharingjob.ISharingJob, lp.services.webhooks.webservice.IWebhookDeliveryJob, lp.snappy.interfaces.snapbuildjob.ISnapStoreUploadJob, lp.snappy.interfaces.snapjob.ISnapRequestBuildsJob, lp.soyuz.interfaces.archivejob.IPackageUploadNotificationJob, lp.soyuz.interfaces.distributionjob.IDistroSeriesDifferenceJob, lp.soyuz.interfaces.distributionjob.IInitializeDistroSeriesJob, lp.soyuz.interfaces.packagecopyjob.IPlainPackageCopyJob, lp.soyuz.interfaces.packagediffjob.IPackageDiffJob, lp.soyuz.interfaces.packagetranslationsuploadjob.IPackageTranslationsUploadJob, lp.soyuz.interfaces.processacceptedbugsjob.IProcessAcceptedBugsJob

Interface for jobs that can be run via the JobRunner.
Method notifyOops Notify interested parties that this job produced an OOPS.
Method getOopsVars Return a list of variables to appear in the OOPS.
Method getOperationDescription Describe the operation being performed, for use in oops emails.
Attribute user_error_types A tuple of exception classes which result from user error.
Attribute retry_error_types A tuple of exception classes which should cause a retry.
Attribute timeline_detail_filter An optional (category, detail) -> detail callable to filter timeline action details. This may be used when some details are expected to be very large.
Method notifyUserError Notify interested parties that this job encountered a user error.
Method run Run this job.
Method celeryRunOnCommit Request Celery to run this job on transaction commit.

Inherited from IJob:

Int job_id Undocumented
Datetime scheduled_start Undocumented
Datetime date_created Undocumented
Datetime date_started Undocumented
Datetime date_finished Undocumented
Datetime lease_expires Undocumented
Text log Undocumented
Choice status The current state of the job.
Int attempt_count Undocumented
Int max_retries Undocumented
Bool is_pending Undocumented
Bool is_runnable Undocumented
Attribute base_json_data A dict of data about the job.
Choice base_job_type What type of job this is, only used for jobs that do not have their own tables.
Method acquireLease Acquire the lease for this Job, or raise LeaseHeld.
Method getTimeout Determine how long this job can run before timing out.
Method start Mark the job as started.
Method complete Mark the job as completed.
Method fail Indicate that the job has failed permanently.
Method queue Mark the job as queued for processing.
Method suspend Mark the job as suspended.
Method resume Mark the job as waiting.
def notifyOops(oops):
Notify interested parties that this job produced an OOPS.
ParametersoopsThe oops produced by this Job.
def getOopsVars():
Return a list of variables to appear in the OOPS.

These vars should help determine why the jobs OOPsed.

def getOperationDescription():
Describe the operation being performed, for use in oops emails.

Should grammatically fit the phrase "error while FOO", e.g. "error while sending mail."

user_error_types =
A tuple of exception classes which result from user error.
retry_error_types =
A tuple of exception classes which should cause a retry.
timeline_detail_filter =
An optional (category, detail) -> detail callable to filter timeline action details. This may be used when some details are expected to be very large.
def notifyUserError(e):
Notify interested parties that this job encountered a user error.
ParameterseThe exception encountered by this job.
def run():
Run this job.
def celeryRunOnCommit():
Request Celery to run this job on transaction commit.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.