pub enum JobStatus {
Complete,
Executing,
Scheduled,
Retryable,
Cancelled,
Discarded,
}Expand description
The status of the job.
When a job is first inserted it will be in the JobStatus::Scheduled state.
Variants§
Complete
The status of the job after it has ran successfully.
I.e The state of the job after crate::executor::Executor returns
crate::executor::ExecutionResult::Done.
Executing
The status of the job while an executor is running the job.
Scheduled
Initial state of the job before any attempt has been made to run the job.
Usually this will imply that the jobs scheduled_at field is in the future. However, this
is not always the case. It is possible that a job gets inserted with a scheduled_at in
the past, or when the system has been offline for some time.
Retryable
State of the job after the first failed attempt to execute the job if the job’s
max_attempts field is greater than one.
Cancelled
The state of the job after crate::executor::Executor returns
crate::executor::ExecutionResult::Cancel.
Discarded
The state of the job attempting the job max_attempts times without success.