Skip to content

Commit

Permalink
调用Maa出错时,发送邮件提醒、关闭游戏
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoZuohong committed Oct 3, 2023
1 parent 7b24b5c commit b097b6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arknights_mower/solvers/base_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -2433,8 +2433,9 @@ def maa_plan_solver(self, tasks='All', one_time=False):
except Exception as e:
logger.exception(e)
self.MAA = None
self.device.exit(self.package_name)
self.send_email(str(e), "Maa调用出错!")
remaining_time = (self.tasks[0].time - datetime.now()).total_seconds()
if remaining_time > 0:
logger.info(f"休息 {format_time(remaining_time)},到{self.tasks[0].time.strftime('%H:%M:%S')}开始工作")
time.sleep(remaining_time)
self.device.exit(self.package_name)

0 comments on commit b097b6e

Please sign in to comment.