add start_watchdog/reset_watchdog to tasks

This commit is contained in:
Aleix Conchillo Flaqué
2025-06-23 15:26:34 -07:00
parent 5a3457ba33
commit 076a8938f0
19 changed files with 86 additions and 10 deletions

View File

@@ -412,6 +412,8 @@ class FrameProcessor(BaseObject):
(frame, direction, callback) = await self.__input_queue.get()
self.start_watchdog()
# Process the frame.
await self.process_frame(frame, direction)
@@ -421,6 +423,8 @@ class FrameProcessor(BaseObject):
self.__input_queue.task_done()
self.reset_watchdog()
def __create_push_task(self):
if not self.__push_frame_task:
self.__push_queue = asyncio.Queue()
@@ -434,5 +438,7 @@ class FrameProcessor(BaseObject):
async def __push_frame_task_handler(self):
while True:
(frame, direction) = await self.__push_queue.get()
self.start_watchdog()
await self.__internal_push_frame(frame, direction)
self.__push_queue.task_done()
self.reset_watchdog()