From 6329f3e39d7557843772993250d4ecc68de19455 Mon Sep 17 00:00:00 2001 From: Franklin-F Date: Fri, 4 Jul 2025 21:06:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=A4=9A=E4=B8=AA?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=96=87=E4=BB=B6=E4=BB=A5=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E7=A8=8B=E5=BA=8F=E7=9A=84=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=92=8C=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DB.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DB.py b/DB.py index ec66d53..c59a216 100644 --- a/DB.py +++ b/DB.py @@ -412,7 +412,7 @@ class DBVidcon: self.flush() @mysql_retry() - def update_fight_record_status(self, ids: list[int], report_id: int, new_status: int, errinfo: str = "", + def update_fight_record_status(self, ids, report_id: int, new_status: int, errinfo: str = "", report_time: int = 0, subsequent_status: int = 1, mid=0): if not ids: return # 空列表直接返回 @@ -786,7 +786,7 @@ class DBSA: except Exception as e: err_no = getattr(e.orig, "args", [None])[0] if err_no == cls.DEADLOCK_ERRNO and attempt < cls.MAX_SQL_RETRY - 1: - sleep(cls.SQL_RETRY_BASE_SLEEP * (attempt + 1)) + time.sleep(cls.SQL_RETRY_BASE_SLEEP * (attempt + 1)) logger.warning("[%s] 死锁重试 %d/%d", desc, attempt + 1, cls.MAX_SQL_RETRY) continue @@ -802,7 +802,7 @@ class DBSA: except Exception as e: logger.error("[flush] 第 %d 轮失败: %s", round_no, e) if round_no < cls.FLUSH_RETRY: - sleep(cls.DELAY_ON_FAIL) + time.sleep(cls.DELAY_ON_FAIL) logger.info("[flush] 等待 %ds 后重试…", cls.DELAY_ON_FAIL) else: logger.error("[flush] 连续 %d 轮失败,退回 Redis", cls.FLUSH_RETRY)