LocalEventManager
Hierarchy
- EventManager
- LocalEventManager
Index
Constructors
Methods
Constructors
__init__
A default constructor.
Parameters
system_info_interval: timedelta = timedelta(seconds=1)
Interval at which
SystemInfo
events are emitted.keyword-onlypersist_state_interval: timedelta
Interval between emitted
PersistState
events to maintain state persistence.keyword-onlyclose_timeout: timedelta | None
Optional timeout for canceling pending event listeners if they exceed this duration.
Returns None
Methods
__aenter__
Initializes the local event manager upon entering the async context.
It starts emitting system info events at regular intervals.
Returns LocalEventManager
__aexit__
Closes the local event manager upon exiting the async context.
It stops emitting system info events and closes the event manager.
Parameters
exc_type: type[BaseException] | None
exc_value: BaseException | None
exc_traceback: TracebackType | None
Returns None
emit
off
on
wait_for_all_listeners_to_complete
Wait for all currently executing event listeners to complete.
Parameters
keyword-onlytimeout: timedelta | None = None
The maximum time to wait for the event listeners to finish. If they do not complete within the specified timeout, they will be canceled.
Returns None
Local event manager for emitting system info events.