소스 검색

fix(Exploration): add timeout for shikigami addition

stigma 10 달 전
부모
커밋
c5415b39ce
1개의 변경된 파일과 4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      tasks/Exploration/base.py

+ 4 - 0
tasks/Exploration/base.py

@@ -228,7 +228,11 @@ class BaseExploration(GameUi, GeneralBattle, GeneralRoom, GeneralInvite, Replace
                 self.swipe(self.S_SWIPE_SHIKI_TO_LEFT)
             else:
                 break
+        operation_timeout = Timer(60)
+        operation_timeout.start()
         while 1:
+            if operation_timeout.reached():
+                raise GameStuckError('Adding shikigami timeout')
             # 候补出战数量识别
             self.screenshot()
             if not self.appear(self.I_E_OPEN_SETTINGS):