10.1.9. Class cerebro.aclasses.Statuses

class cerebro.aclasses.Statuses[source]

Statuses class.

Methods

statuses = cerebro.core.statuses()      
DATA_ = ''

Fields of status data tuple

DATA_COLOR = 6

Status color. RGB format is presented as an integer.

DATA_DESCRIPTION = 4

Status description.

DATA_FLAGS = 2

Status flags.

DATA_ICON = 5

Status icon. XPM format.

DATA_ID = 0

Status ID.

DATA_NAME = 1

Status name.

DATA_ORDER = 3

Status order number.

FLAG_ = ''

Status flags

FLAG_INHERITABLE = 1

Status is inherited.

TYPE_ = ''

Status types

TYPE_IS_IN_PROGRESS = 1

Task is performed.

TYPE_IS_STOPPED = 2

Task is stopped.

TYPE_IS_SUSPENDED = 0

Task is suspended.

data()[source]
Returns:a list of tuples on all statuses.
Return type:list(tuple,)

. seealso:: possible_statuses().

inheritable(status_flags)[source]
Parameters:status_flags (int) – status flag values.
Returns:True, if the flag is installed as inherited.
Return type:bool

The inherited status under task container installation is inherited by all sub-tasks within the task.

Example of sample status, you can set to tasks-containers

inherit_statuses = list()
statuses = cerebro.core.statuses()
for status in statuses.data():
        if cerebro.aclasses.Statuses.inheritable(status[statuses.DATA_FLAGS]) == True:
                inherit_statuses.append(status)         
type(status_flags)[source]
Parameters:status_flags (int) – status flag values.
Returns:тип статуса.
Return type:int

Status type shows the condition of the task, when this status is installed.