diff --git a/viseron/components/data_stream/__init__.py b/viseron/components/data_stream/__init__.py index 9f0a74cf..963d41f2 100644 --- a/viseron/components/data_stream/__init__.py +++ b/viseron/components/data_stream/__init__.py @@ -173,17 +173,6 @@ def _wrapper(): else: await ioloop.run_in_executor(None, _wrapper) - async def put_tornado_queue( - self, queue: tornado_queue, data: Any, ioloop: IOLoop - ) -> None: - """Put data in tornado queue.""" - - def _wrapper(): - IOLoop.current() - helpers.pop_if_full(queue, data) - - await ioloop.run_in_executor(None, _wrapper) - def run_callbacks( self, callbacks: dict[uuid.UUID, DataSubscriber], @@ -251,10 +240,9 @@ def run_callbacks( callback["callback"], tornado_queue ): callback["ioloop"].add_callback( - self.put_tornado_queue, + helpers.pop_if_full, callback["callback"], data, - callback["ioloop"], ) continue