Browse Source

check workers

taruu 2 months ago
parent
commit
66c9f2faf6
1 changed files with 3 additions and 0 deletions
  1. 3 0
      main.py

+ 3 - 0
main.py

@@ -86,6 +86,9 @@ class FrameTakeWorker:
     async def get_frame(self):
         return next(self.frame_gen)
 
+    def __del__(self):
+        self.frame_gen.close()
+
     async def frame_extractor(self, frame_bytes: bytes):
         loop = asyncio.get_event_loop()
         logger.info(f"Input bytes: {len(frame_bytes)}")