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)