Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task: Document all task result state from the enum list #528

Open
1 task done
kairoaraujo opened this issue Feb 1, 2024 · 0 comments
Open
1 task done

Task: Document all task result state from the enum list #528

kairoaraujo opened this issue Feb 1, 2024 · 0 comments
Labels
good first issue Good for newcomers hacktoberfest Opt-in with this issue to Hacktoberfest and indicate you’re looking for contributions.

Comments

@kairoaraujo
Copy link
Member

What is the task about?

We should explicitly document all the tasks state from the enum list in the API Model.

See:

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

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
@kairoaraujo kairoaraujo added the good first issue Good for newcomers label Feb 1, 2024
@kairoaraujo kairoaraujo added the hacktoberfest Opt-in with this issue to Hacktoberfest and indicate you’re looking for contributions. label Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hacktoberfest Opt-in with this issue to Hacktoberfest and indicate you’re looking for contributions.
Projects
None yet
Development

No branches or pull requests

1 participant