From 2e924f380fce711eedcb229bc8bf2638a1aa7e50 Mon Sep 17 00:00:00 2001 From: W1NDes Date: Thu, 19 Mar 2026 19:17:54 +0800 Subject: [PATCH] =?UTF-8?q?Fix(alas):=20=E4=B8=BArestart=E7=9A=84gameDied?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=87=8D=E8=AF=95=E4=B8=8A=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- alas.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/alas.py b/alas.py index 38650f938..4d6887067 100644 --- a/alas.py +++ b/alas.py @@ -732,7 +732,17 @@ class AzurLaneAutoScript: exit(1) except GameNotRunningError as e: if str(e) == "Game died": - logger.warning("Game died when restarting") + self.GameRestartBecauseErrorTimes += 1 + logger.critical(f'Game died when restarting, left Restart Time: {self.AutoRestart_AttemptsToRestart - self.GameRestartBecauseErrorTimes}') + if self.GameRestartBecauseErrorTimes >= self.AutoRestart_AttemptsToRestart: + self.GameRestartBecauseErrorTimes = 0 + logger.critical('Game died too many times during restart') + handle_notify( + self.config.Error_OnePushConfig, + title=f"Alas <{self.config_name}> crashed", + content=f"<{self.config_name}> Game died too many times during restart", + ) + exit(1) self.is_first_task = False continue else: