From b679c249f8fb1417374d50d9f7886f0a931c17f4 Mon Sep 17 00:00:00 2001 From: hishizuka <12926652+hishizuka@users.noreply.github.com> Date: Thu, 4 Jan 2024 07:19:48 +0900 Subject: [PATCH] modify --- modules/config.py | 2 +- modules/helper/network.py | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/modules/config.py b/modules/config.py index e82aa0bb..5dd38b11 100644 --- a/modules/config.py +++ b/modules/config.py @@ -360,7 +360,7 @@ class Config: "HAVE_API_TOKEN": False, "SERVER": "demo.thingsboard.io", "TOKEN": "", - "INTERVAL_SEC": 120, + "INTERVAL_SEC": 180, } # IMU axis conversion diff --git a/modules/helper/network.py b/modules/helper/network.py index 5f13fda6..1cd6454f 100644 --- a/modules/helper/network.py +++ b/modules/helper/network.py @@ -97,9 +97,7 @@ async def download_worker(self): res = None try: await self.open_bt_tethering(f_name) - # app_logger.info(f"start download files({len(q['urls'])}), {q['urls'][0]} / {self.download_queue.qsize()}") res = await download_files(**q) - # app_logger.info(res) self.download_queue.task_done() except concurrent.futures._base.CancelledError: return @@ -107,8 +105,8 @@ async def download_worker(self): # all False -> give up if not any(res) or res is None: failed.append((datetime.now(), q)) - app_logger.error(f"failed download ({len(q['urls'])}), {bool(detect_network())}") - app_logger.debug(q["urls"]) + app_logger.error(f"failed download ({len(q['urls'])}), network: {bool(detect_network())}") + app_logger.error(q["urls"]) # retry elif not all(res) and len(q["urls"]) and len(q["urls"]) == len(res): retry_urls = [] @@ -297,9 +295,7 @@ async def open_bt_tethering(self, f_name): app_logger.error(f"[BT] connect error, network: {bool(detect_network())}({count}s), f_name: {f_name}") return False - # app_logger.debug(f"bt_pan_status:{bt_pan_status}, {detect_network()}") await asyncio.sleep(5) - app_logger.info(f"[BT] connect, network: {bool(detect_network())}({count}s), f_name: {f_name}") return True