Skip to content

Commit

Permalink
Merge pull request #893 from roflcoopter/feature/mjpeg-stream-fix
Browse files Browse the repository at this point in the history
fix mjpeg stream exception
  • Loading branch information
roflcoopter authored Jan 18, 2025
2 parents 7b387f2 + cd276ed commit 9f88d28
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions viseron/components/data_stream/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 9f88d28

Please sign in to comment.