spinetoolbox.spine_engine_worker

Contains SpineEngineWorker.

Module Contents

Classes

SpineEngineWorker

param engine_data

engine data

Functions

_handle_dag_execution_started(project_items)

_handle_node_execution_ignored(project_items)

_handle_node_execution_started(item, direction)

_handle_node_execution_finished(item, direction, ...)

_handle_event_message_arrived(item, filter_id, ...)

_handle_process_message_arrived(item, filter_id, ...)

_handle_prompt_arrived(prompt, engine_mngr[, logger])

_handle_flash_arrived(connection)

_mark_all_items_failed(items)

Fails all project items.

spinetoolbox.spine_engine_worker._handle_dag_execution_started(project_items)[source]
spinetoolbox.spine_engine_worker._handle_node_execution_ignored(project_items)[source]
spinetoolbox.spine_engine_worker._handle_node_execution_started(item, direction)[source]
spinetoolbox.spine_engine_worker._handle_node_execution_finished(item, direction, item_state)[source]
spinetoolbox.spine_engine_worker._handle_event_message_arrived(item, filter_id, msg_type, msg_text)[source]
spinetoolbox.spine_engine_worker._handle_process_message_arrived(item, filter_id, msg_type, msg_text)[source]
spinetoolbox.spine_engine_worker._handle_prompt_arrived(prompt, engine_mngr, logger=None)[source]
spinetoolbox.spine_engine_worker._handle_flash_arrived(connection)[source]
spinetoolbox.spine_engine_worker._mark_all_items_failed(items)[source]

Fails all project items.

Parameters

items (list of ProjectItem) – project items

class spinetoolbox.spine_engine_worker.SpineEngineWorker(engine_data, dag, dag_identifier, project_items, connections, logger, job_id)[source]

Bases: PySide6.QtCore.QObject

Parameters
  • engine_data (dict) – engine data

  • dag (DirectedGraphHandler) –

  • dag_identifier (str) –

  • project_items (dict) – mapping from project item name to ProjectItem

  • connections (dict) – mapping from jump name to LoggingConnection or LoggingJump

  • logger (LoggerInterface) – a logger

  • job_id (str) – Job id for remote execution

property job_id[source]
property engine_data[source]

Engine data dictionary.

finished[source]
_mark_items_ignored[source]
_dag_execution_started[source]
_node_execution_started[source]
_node_execution_finished[source]
_event_message_arrived[source]
_process_message_arrived[source]
_prompt_arrived[source]
_flash_arrived[source]
_all_items_failed[source]
get_engine_data()[source]

Returns the engine data. Together with self.set_engine_data() it can be used to modify the workflow after it’s initially created. We use it at the moment for creating Julia sysimages.

Returns

dict

set_engine_data(engine_data)[source]

Sets the engine data.

Parameters

engine_data (dict) – New data

_handle_event_message_arrived_silent(item, filter_id, msg_type, msg_text)[source]
_handle_process_message_arrived_silent(item, filter_id, msg_type, msg_text)[source]
stop_engine()[source]
engine_final_state()[source]
thread()[source]
_connect_log_signals(silent)[source]
start(silent=False)[source]

Connects log signals.

Parameters

silent (bool, optional) – If True, log messages are not forwarded to the loggers but saved in internal dicts.

_included_and_ignored_items()[source]

Returns two lists, where the first one contains project items that are about to be executed and the second one contains project items that are about to be ignored.

_included_items(permitted_items, connections)[source]

Collects a list of project item names that are going to be executed in this DAG based on execution permits and connections in the DAG.

Parameters
  • permitted_items (dict) – Mapping of item names to bool. True items have been selected by user for execution.

  • connections (list) – Serialized connections

Returns

Project item names

Return type

list

do_work()[source]

Does the work and emits finished when done.

_process_event(event_type, data)[source]
_handle_prompt(prompt)[source]
_handle_flash(flash)[source]
_handle_standard_execution_msg(msg)[source]
_handle_persistent_execution_msg(msg)[source]
_handle_kernel_execution_msg(msg)[source]
_handle_process_msg(data)[source]
_do_handle_process_msg(item_name, filter_id, msg_type, msg_text)[source]
_handle_event_msg(data)[source]
_do_handle_event_msg(item_name, filter_id, msg_type, msg_text)[source]
_handle_node_execution_started(data)[source]
_do_handle_node_execution_started(item_name, direction)[source]

Starts item icon animation when executing forward.

_handle_node_execution_finished(data)[source]
_do_handle_node_execution_finished(item_name, direction, state, item_state)[source]
_handle_server_status_msg(data)[source]
clean_up()[source]