|
@@ -387,6 +387,8 @@ class Script:
|
|
|
logger.critical('Game page unknown')
|
|
logger.critical('Game page unknown')
|
|
|
self.save_error_log()
|
|
self.save_error_log()
|
|
|
self.config.notifier.push(title=f'{I18n.trans_zh_cn(command)}{command}', content=f"<{self.config_name}> GamePageUnknownError")
|
|
self.config.notifier.push(title=f'{I18n.trans_zh_cn(command)}{command}', content=f"<{self.config_name}> GamePageUnknownError")
|
|
|
|
|
+ self.config.task_call('Restart')
|
|
|
|
|
+ self.device.sleep(10)
|
|
|
return False
|
|
return False
|
|
|
except ScriptError as e:
|
|
except ScriptError as e:
|
|
|
logger.critical(e)
|
|
logger.critical(e)
|
|
@@ -480,6 +482,13 @@ class Script:
|
|
|
logger.critical("Possible reason #2: There is a problem with this task. "
|
|
logger.critical("Possible reason #2: There is a problem with this task. "
|
|
|
"Please contact developers or try to fix it yourself.")
|
|
"Please contact developers or try to fix it yourself.")
|
|
|
logger.critical('Request human takeover')
|
|
logger.critical('Request human takeover')
|
|
|
|
|
+ # 添加失败三次的推送通知
|
|
|
|
|
+ self.config.notifier.push(
|
|
|
|
|
+ title=f'{I18n.trans_zh_cn(task)}{task}',
|
|
|
|
|
+ content=f"<{self.config_name}> 任务连续失败三次,请上线查看"
|
|
|
|
|
+ )
|
|
|
|
|
+ # 关闭模拟器
|
|
|
|
|
+ self.device.emulator_stop()
|
|
|
exit(1)
|
|
exit(1)
|
|
|
|
|
|
|
|
if success:
|
|
if success:
|