Skip to content

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

@kairoaraujo

Description

@kairoaraujo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomershacktoberfestOpt-in with this issue to Hacktoberfest and indicate you’re looking for contributions.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions