doc: Job statuses descriptions (#2075)

* doc: Job statuses descriptions

* Applied review suggestions
This commit is contained in:
Alpha 2024-05-01 03:25:26 -04:00 committed by GitHub
parent 4efd81e648
commit 87af9b51e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 15 additions and 0 deletions

View File

@ -125,6 +125,21 @@ for job in jobs:
print('Job %s: %s' % (job.id, job.func_name))
```
#### Job Status
The status of a job can be one of the following:
* `queued`: The default status for created jobs, except for those that have dependencies, which will be created as `deferred`. These jobs have been placed in a queue and are ready to be executed.
* `finished`: The job has finished execution and is available through the finished job registry.
* `failed`: Jobs that encountered errors during execution or expired before being executed.
* `started`: The job has started execution. This status includes the job execution support mechanisms, such as setting the worker name and setting up heartbeat information.
* `deferred`: The job is not ready for execution because its dependencies have not finished successfully yet.
* `scheduled`: Jobs created to run at a future date or jobs that are retried after a retry interval.
* `stopped`: The job was stopped because the worker was stopped.
* `canceled`: The job has been manually canceled and will not be executed, even if it is part of a dependency chain.
These statuses can also be accessed from the job object using boolean properties, such as `job.is_finished`.
## Stopping a Currently Executing Job
_New in version 1.7.0_