Skip to content

Module pycalrissian.execution

Classes

CalrissianExecution

class CalrissianExecution(
    job: pycalrissian.job.CalrissianJob,
    runtime_context: pycalrissian.context.CalrissianContext
)

Methods

get_completion_time

def get_completion_time(
    self
)

Returns either the completion time or the last transition time

get_file_from_volume

def get_file_from_volume(
    self,
    filenames
)

get_log

def get_log(
    self
)

Returns the job execution log

get_output

def get_output(
    self
) -> Dict

Returns the job output

get_start_time

def get_start_time(
    self
)

Returns the start time

get_status

def get_status(
    self
)

Returns the job status

get_tool_logs

def get_tool_logs(
    self
)

stages the tool logs from k8s volume

get_usage_report

def get_usage_report(
    self
) -> Dict

Returns the job usage report

get_waiting_pods

def get_waiting_pods(
    self
) -> List[kubernetes.client.models.v1_pod.V1Pod]

is_active

def is_active(
    self
) -> bool

Returns True if the job execution is on-going

is_complete

def is_complete(
    self
) -> bool

Returns True if the job execution is completed (success or failed)

is_succeeded

def is_succeeded(
    self
) -> bool

Returns True if the job execution is completed and succeeded

monitor

def monitor(
    self,
    interval: int = 5,
    grace_period=120,
    wall_time: Optional[int] = None
) -> None

submit

def submit(
    self
)

Submits the job to the cluster

JobStatus

class JobStatus(
    *args,
    **kwds
)

Create a collection of name/value pairs.

Example enumeration:

class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3

Access them by:

  • attribute access::

Color.RED

  • value lookup:

Color(1)

  • name lookup:

Color['RED']

Enumerations can be iterated over, and know how many members they have:

len(Color) 3

list(Color) [, , ]

Methods can be added to enumerations, and members can have their own attributes -- see the documentation for details.

Ancestors (in MRO)

  • enum.Enum

Class variables

ACTIVE
FAILED
KILLED
SUCCEEDED
name
value