Initialize a new instance. In most cases, you should use the `from_config` constructor to create a new instance based on the provided configuration. Args: system_info_interval: Interval at which `SystemInfo` events are emitted. event_manager_options:
(
self,
system_info_interval: timedelta = timedelta(seconds=1),
**event_manager_options: Unpack[EventManagerOptions],
)
| 32 | """ |
| 33 | |
| 34 | def __init__( |
| 35 | self, |
| 36 | system_info_interval: timedelta = timedelta(seconds=1), |
| 37 | **event_manager_options: Unpack[EventManagerOptions], |
| 38 | ) -> None: |
| 39 | """Initialize a new instance. |
| 40 | |
| 41 | In most cases, you should use the `from_config` constructor to create a new instance based on |
| 42 | the provided configuration. |
| 43 | |
| 44 | Args: |
| 45 | system_info_interval: Interval at which `SystemInfo` events are emitted. |
| 46 | event_manager_options: Additional options for the parent class. |
| 47 | """ |
| 48 | self._system_info_interval = system_info_interval |
| 49 | |
| 50 | # Recurring task for emitting system info events. |
| 51 | self._emit_system_info_event_rec_task = RecurringTask( |
| 52 | func=self._emit_system_info_event, |
| 53 | delay=self._system_info_interval, |
| 54 | ) |
| 55 | |
| 56 | super().__init__(**event_manager_options) |
| 57 | |
| 58 | @classmethod |
| 59 | def from_config(cls, config: Configuration | None = None) -> LocalEventManager: |
nothing calls this directly
no test coverage detected