qrisp.interface.Job.status#
- abstractmethod Job.status() JobStatus[source]#
Query and return the current
JobStatusof the job.Typically this is a live query: it fetches the most up-to-date status available, which for remote backends may involve a network call. As a side effect, concrete implementations should store the result in
_last_known_statusbefore returning, so thatlast_known_statusalways reflects the most recently observed state.Once a job has reached a terminal state (
DONE,CANCELLED, orERROR), that state cannot change again. Implementations may take advantage of this as an optimization and return the already-known terminal status without repeating the query.Callers that want to avoid the cost of a live query can also read
last_known_statusdirectly. Callrefresh()(orstatus()) when an explicit update is needed.- Returns:
- JobStatus