zhm
2025-07-25 112aace08718ad0ead624286fe09e4bf941dee5a
qwen_detect.py
@@ -241,11 +241,11 @@
    def shutdown_all(self) -> None:
        """清理所有线程"""
        with self.lock:
            for camera_id, thread in list(self.threads.items()):
                if thread.is_alive():
                    thread.join(timeout=1)
                del self.threads[camera_id]
        for camera_id, thread in list(self.threads.items()):
            if thread.is_alive():
                thread.join(timeout=1)
            del self.threads[camera_id]
    #获取任务
    def getTaskconf(self,isupdate):
@@ -301,6 +301,7 @@
                        thread = pool.threads.get(camera.get("camera_id"))
                        if not thread:
                            logging.info(f"开始创建{camera.get('camera_id')}线程")
                            pool.safe_start(pool.workerWarning, camera.get('camera_id'))
                            pool.safe_start(pool.worker, camera.get('camera_id'))
                            logging.info(f"{camera.get('camera_id')}线程创建完毕")