BaseJob¶
-
class
BaseJob
(backend, job_id)[source]¶ Bases:
abc.ABC
DEPRECATED Legacy Class to handle asynchronous jobs
Initializes the asynchronous job.
- Parameters
backend (
BaseBackend
) – the backend used to run the job.job_id (
str
) – a unique id in the context of the backend used to run the job.
Methods
Return the backend where this job was executed.
Attempt to cancel the job.
Return whether the job has been cancelled.
Return whether the job has successfully run.
Return whether the job is in a final job state.
Return a unique id identifying the job.
Return the results of the job.
Return whether the job is actively running.
Return the status of the job, among the values of
JobStatus
.Submit the job to the backend for execution.
Poll the job status until it progresses to a final state such as
DONE
orERROR
.