-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
good first issueGood for newcomersGood for newcomershacktoberfestOpt-in with this issue to Hacktoberfest and indicate you’re looking for contributions.Opt-in with this issue to Hacktoberfest and indicate you’re looking for contributions.
Description
What is the task about?
We should explicitly document all the tasks state from the enum list in the API Model.
See:
repository-service-tuf-api/repository_service_tuf_api/tasks.py
Lines 16 to 29 in db8ee39
| class TaskState(str, enum.Enum): | |
| PENDING = states.PENDING | |
| RECEIVED = states.RECEIVED | |
| STARTED = states.STARTED | |
| SUCCESS = states.SUCCESS | |
| FAILURE = states.FAILURE | |
| REVOKED = states.REVOKED | |
| REJECTED = states.REJECTED | |
| RETRY = states.RETRY | |
| IGNORED = states.IGNORED | |
| ERRORED = "ERRORED" | |
| RUNNING = "RUNNING" # custom state used when a task is RUNNING in RSTUF | |
repository-service-tuf-api/repository_service_tuf_api/tasks.py
Lines 68 to 81 in db8ee39
| state: TaskState = Field( | |
| description=( | |
| "The Celery task state. Note: It isn't the task result status.\n\n" | |
| "`PENDING`: Task state is unknown (assumed pending since you know " | |
| "the id).\n\n" | |
| "`RECEIVED`: Task received by a worker (only used in events).\n\n" | |
| "`STARTED`: Task started by a worker.\n\n" | |
| "`RUNNING`: Task is running.\n\n" | |
| "`SUCCESS`: Task succeeded.\n\n" | |
| "`FAILURE`: Task failed.\n\n" | |
| "`ERRORED`: Task errored. RSTUF identified an error while " | |
| "processing the task.\n\n" | |
| "`REVOKED`: Task revoked.\n\n" | |
| "`REJECTED`: Task was rejected (only used in events).\n\n" |
Parent feature
No response
References
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershacktoberfestOpt-in with this issue to Hacktoberfest and indicate you’re looking for contributions.Opt-in with this issue to Hacktoberfest and indicate you’re looking for contributions.