wrench.sleep_action

class wrench.sleep_action.SleepAction(simulation, compound_job: CompoundJob, name: str, sleep_time: float)

Bases: Action

WRENCH Sleep Action class

class ActionState(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

COMPLETED = 3
FAILED = 5
KILLED = 4
NOT_READY = 0
READY = 1
STARTED = 2
get_end_date() float

Get the action’s end date

Returns:

a date (or -1 if not ended)

Return type:

float

get_failure_cause() str

Get the action’s failure cause

Returns:

a failure cause (or None if no failure has occurred)

Return type:

str

get_job() CompoundJob

Get the job that this task belongs to

Returns:

a list of task objects

Return type:

List[Task]

get_name() str

Get the name

get_sleep_time() float

Get sleep time

Returns:

a sleep time

Return type:

float

get_start_date() float

Get the action’s start date

Returns:

a date (or -1 if not started)

Return type:

float

get_state() ActionState

Get the state of the action