HeartbeatChecker Module#
SPDX-FileCopyrightText: 2024 DESY and the Constellation authors SPDX-License-Identifier: EUPL-1.2
- class core.heartbeatchecker.HeartbeatChecker(*args: Any, **kwargs: Any)#
Bases:
BaseSatelliteFrame
Checks periodically Satellites’ state via subscription to its Heartbeat.
Individual heartbeat checks run in separate threads. In case of a failure (either the Satellite is in ERROR/SAFE state or has missed several heartbeats) the corresponding thread will set a failed event. Alternatively, an action can be triggered via a callback.
- HB_INIT_LIVES = 3#
- HB_INIT_PERIOD = 2000#
- property fail_events: dict[str, Event]#
Return a dictionary of Events triggered for failed Satellites.
- heartbeat_host_is_registered(host: UUID) bool #
Check whether a given Satellite is already registered.
- heartbeat_name_is_registered(name: str) bool #
Check whether a given Satellite is already registered.
- property heartbeat_states: dict[str, SatelliteState]#
Return a dictionary of the monitored Satellites’ state.