wrench.file_read_action

class wrench.file_read_action.FileReadAction(simulation, compound_job: CompoundJob, name: str, file: File, storage_service: StorageService, num_bytes_to_read: int, uses_scratch: bool)

Bases: Action

WRENCH 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_file() File

Get file being read Updated upstream :return: file

Returns:

file object

Return type:

File

get_file_location() StorageService

Get storage service file is located in :return: storage service object :rtype: StorageService

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_num_bytes_to_read() int

Get number of bytes to read from file :return: number of bytes being read :rtype: int

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

uses_scratch() bool

Returns whether the action uses scratch :return: boolean on whether action uses scratch :rtype: boolean