distributor.distributor_task_instance

Task Instance object from the distributor’s perspective.

Attributes

logger

Classes

DistributorTaskInstance

Object used for communicating with JSM from the distributor node.

Module Contents

distributor.distributor_task_instance.logger[source]
class distributor.distributor_task_instance.DistributorTaskInstance(task_instance_id: int, workflow_run_id: int, status: str, requester: jobmon.core.requester.Requester)[source]

Object used for communicating with JSM from the distributor node.

task_instance_id[source]
workflow_run_id[source]
status[source]
error_state = ''[source]
error_msg = ''[source]
requester[source]
property submission_name: str[source]
property batch: jobmon.distributor.task_instance_batch.TaskInstanceBatch[source]

Returns the batch the DistributorTaskInstance is in.

property array_step_id: int[source]

Returns the array step of the TI.

property distributor_id: str[source]

Returns the distributor id of the TI.

transition_to_launched(distributor_id: str, next_report_increment: float) None[source]

Register the submission of a new task instance to a cluster.

This method is never called by the happy path - only if array submission is not implemented on a particular cluster type.

transition_to_no_distributor_id(no_id_err_msg: str) None[source]

Register that submission failed with the central service.

Parameters:

no_id_err_msg – The error msg from the executor when failed to obtain distributor id.

_transition_to_error(error_message: str, error_state: str) None[source]

Transitions the TaskInstance to the specified error state.

transition_to_unknown_error(error_message: str, error_state: str) Tuple[Set[DistributorTaskInstance], List][source]

Register that an unknown error was discovered during reconciliation.

transition_to_resource_error(error_message: str, error_state: str) Tuple[Set[DistributorTaskInstance], List][source]

Register that a resource error was discovered during reconciliation.

transition_to_error(error_message: str, error_state: str) Tuple[Set[DistributorTaskInstance], List][source]

Register that a known error occurred during reconciliation.

__hash__() int[source]

Returns the id of the TaskInstance.

__eq__(other: object) bool[source]

Check if the hashes of two tasks are equivalent.

__lt__(other: DistributorTaskInstance) bool[source]

Check if one hash is less than the has of another Task.

__repr__() str[source]

Return a short representation string.