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

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

Known subclasses: lp.services.job.interfaces.job.IRunnableJob, lp.translations.interfaces.translationsharingjob.ITranslationSharingJob

Basic attributes of a job.
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.
job_id =
Undocumented
scheduled_start =
Undocumented
date_created =
Undocumented
date_started =
Undocumented
date_finished =
Undocumented
lease_expires =
Undocumented
log =
Undocumented
status =
The current state of the job.
attempt_count =
Undocumented
max_retries =
Undocumented
is_pending =
Undocumented
is_runnable =
Undocumented
base_json_data =
A dict of data about the job.
base_job_type =
What type of job this is, only used for jobs that do not have their own tables.
def acquireLease(duration=300):
Acquire the lease for this Job, or raise LeaseHeld.
def getTimeout():
Determine how long this job can run before timing out.
def start(manage_transaction=False):
Mark the job as started.
def complete(manage_transaction=False):
Mark the job as completed.
def fail(manage_transaction=False):
Indicate that the job has failed permanently.

Only running jobs can fail.

def queue(manage_transaction=False, abort_transaction=False):
Mark the job as queued for processing.
def suspend(manage_transaction=False):
Mark the job as suspended.

Only waiting jobs can be suspended.

def resume():
Mark the job as waiting.

Only suspended jobs can be resumed.

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.