From 784df78826cc9507e720e2cab288a5b30104bacb Mon Sep 17 00:00:00 2001 From: wzy-warehouse <18135009705@163.com> Date: Tue, 12 May 2026 16:40:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/core/rainfall_manager.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/core/rainfall_manager.py b/app/core/rainfall_manager.py index 146c5a2..0faa6d5 100644 --- a/app/core/rainfall_manager.py +++ b/app/core/rainfall_manager.py @@ -68,12 +68,9 @@ class RainfallManager: # 更新最后记录的ID self.last_max_id = max_id - # 等待一段时间后再次检查(例如每5分钟) - time.sleep(300) - - # 更新查询时间为当前时间 - query_time = datetime.now() - + # 等待一段时间后再次检查 + time.sleep(5) + except Exception as e: self.logger.error(f"监测循环出错: {e}", exc_info=True) time.sleep(60) # 出错后等待1分钟再继续