Skip to content

Commit

Permalink
fix:修复server丢失代码段,修复无法访问report.csv导致后续任务无法进行
Browse files Browse the repository at this point in the history
  • Loading branch information
EightyDollars committed Nov 4, 2023
1 parent bb67b9f commit 863964a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arknights_mower/solvers/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def run(self) -> None:
super().run()
except TypeError:
logger.error("基报识别失败 润!")
except PermissionError:
logger.error("基报记录访问失败")

def is_today_recorded(self) -> bool:
if os.path.exists(self.record_path) is not True:
Expand Down
5 changes: 5 additions & 0 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from arknights_mower.solvers import record
from arknights_mower.utils.conf import load_conf, save_conf, load_plan, write_plan
from arknights_mower.utils import depot
from arknights_mower.utils.path import get_path
from arknights_mower.__main__ import main
from arknights_mower.data import agent_list, shop_items

Expand Down Expand Up @@ -158,6 +159,10 @@ def start():
if mower_process is not None:
return "Mower is already running."

# 创建 tmp 文件夹
tmp_dir = get_path("@app/tmp")
tmp_dir.mkdir(exist_ok=True)

read, write = multiprocessing.Pipe()
mower_process = multiprocessing.Process(
target=main,
Expand Down

0 comments on commit 863964a

Please sign in to comment.