Source code for ska_control_model.task_status

# -*- coding: utf-8 -*-
#
# This file is part of the SKA Control System project.
#
# Distributed under the terms of the BSD 3-clause new license.
# See LICENSE.txt for more info.
"""This module defines an enumerated type for task status."""

import enum


[docs] class TaskStatus(enum.IntEnum): """ The status of a task. A task is any operation that is being performed asynchronously. """ STAGING = 0 """The request to execute the task has not yet been acted upon.""" QUEUED = 1 """The task has been accepted and will be executed at a future time.""" IN_PROGRESS = 2 """The task is being executed.""" ABORTED = 3 """The task has been aborted.""" NOT_FOUND = 4 """The task is not found.""" COMPLETED = 5 """ The task was completed. Note that this does not necessarily imply that the task was executed successfully. Whether the task succeeded or failed is a matter for the :py:class:`~ska_control_model.result_code.ResultCode`. The ``COMPLETED`` value indicates only that execution of the task ran to completion. """ REJECTED = 6 """The task was rejected.""" FAILED = 7 """ The task failed to complete. Note that this should not be used for a task that executes to completion, but does not achieve its goal. This kind of domain-specific notion of "succeeded" versus "failed" should be passed in a :py:class:`~ska_control_model.result_code.ResultCode`. Here, ``FAILED`` means that the task executor has detected a failure of the task to run to completion. For example, execution of the task might have resulted in the raising of an uncaught exception. """