tethys.core.stations.station_zero

Module Contents

tethys.core.stations.station_zero.log[source]
class tethys.core.stations.station_zero.ZeroStation(sessions: List[SessionBase] = None, networks: List[NetworkBase] = None, pipes: List[PipeBase] = None, nodes_a: List[NodeBase] = None, nodes_b: List[NodeBase] = None, to_shuffle_stream: bool = False, stream_lock_ttl: float = 1, stream_lock_blocking: bool = False, stream_waiting_timeout: float = None, max_processes_count: int = 1, monitor_checks_delay: float = 1, update_min_delay: float = 1, heartbeat_fail_delay: float = 60, process_start_callback: Callable = None, process_stop_callback: Callable = None, process_error_callback: Callable = None, spawn_process_start_callback: Callable = None, spawn_process_stop_callback: Callable = None, spawn_process_error_callback: Callable = None, **kwargs)[source]

Bases: tethys.core.regobjs.regobj_zero.ZeroRegistrableObject, tethys.core.stations.station_base.StationBase

The Station entity class of the Zero generation. The ZeroStation is a worker that processes streams data.

Parameters
  • sessions (Iterable[ZeroSession]) – Sessions that will be processed in the station

  • networks (Iterable[ZeroNetwork]) – Networks that will be processed in the station

  • pipes (Iterable[ZeroPipe]) – Pipes that will be processed in the station

  • nodes_a (Iterable[ZeroNode]) – Input nodes (bode_a) that will be processed in the station

  • nodes_b (Iterable[ZeroNode]) – Output nodes that will be processed in the station

  • to_shuffle_stream (bool) – To shuffle streams list in the waiting process

  • stream_lock_ttl (float) – Stream lock timeout in the try_stream function

  • stream_lock_blocking (bool) – Block lock acquire in the try_stream function (affects the streams order)

  • stream_waiting_timeout (float) – How long do streams instances wait for data

  • max_processes_count (int) – The max count multiprocessing processes

  • monitor_checks_delay (float) – The delay between monitoring iterations

  • update_min_delay (float) – The delay between iterations updates

  • heartbeat_fail_delay (float) – The timeout of the streams processes without heartbeats

  • process_start_callback (Callable) – The callback called when streams processes start on the station

  • process_stop_callback (Callable) – The callback called when streams processes stop on the station

  • process_error_callback (Callable) – The callback called when streams processes stop with an error on the station

  • spawn_process_start_callback (Callable) – The callback called when start streams loading

  • spawn_process_stop_callback (Callable) – The callback called when a stream is found

  • spawn_process_error_callback (Callable) – The callback called when streams loading error caused

CLASS_PATH = /stations/[source]

ZeroStation instances collection path in the repository

FIELDS_SCHEMA[source]

ZeroStation fields validators

start(self, **kwargs)[source]

Start the worker process

stop(self, **kwargs)[source]

Stop the worker process