JobResult¶
- class safir.arq.JobResult(id: str, name: str, args: Tuple[Any, ...], kwargs: Dict[str, Any], enqueue_time: datetime, status: JobStatus, queue_name: str, start_time: datetime, finish_time: datetime, success: bool, result: Any)¶
Bases:
JobMetadata
The full result of a job, as well as its metadata.
- args¶
The positional arguments to the task function.
- Type:
Any
- kwargs¶
The keyword arguments to the task function.
- Type:
Any
- enqueue_time¶
Time when the job was added to the queue.
- Type:
- status¶
Status of the job.
States are defined by the
arq.jobs.JobStatus
enumeration:deferred
(in queue, but waiting a predetermined time to become ready to run)queued
(queued to run)in_progress
(actively being run by a worker)complete
(result is available)not_found
(the job cannot be found)
- Type:
- start_time¶
Time when the job started.
- Type:
- finish_time¶
Time when the job finished.
- Type:
- result¶
The job’s result.
- Type:
Any
Methods Summary
from_job
(job)Methods Documentation
- async classmethod from_job(job: Job) JobResult ¶
Initialize the
JobResult
from an arqJob
.- Raises:
JobNotFound – Raised if the job is not found
JobResultUnavailable – Raised if the job result is not available.