Add live streaming logbook websocket endpoint (#72258)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
parent
3390d62b3d
commit
9c3f949165
17 changed files with 2592 additions and 733 deletions
|
@ -75,6 +75,7 @@ from .tasks import (
|
|||
RecorderTask,
|
||||
StatisticsTask,
|
||||
StopTask,
|
||||
SynchronizeTask,
|
||||
UpdateStatisticsMetadataTask,
|
||||
WaitTask,
|
||||
)
|
||||
|
@ -928,6 +929,12 @@ class Recorder(threading.Thread):
|
|||
if self._async_event_filter(event):
|
||||
self.queue_task(EventTask(event))
|
||||
|
||||
async def async_block_till_done(self) -> None:
|
||||
"""Async version of block_till_done."""
|
||||
event = asyncio.Event()
|
||||
self.queue_task(SynchronizeTask(event))
|
||||
await event.wait()
|
||||
|
||||
def block_till_done(self) -> None:
|
||||
"""Block till all events processed.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue