Skip to content

Commit

Permalink
log 优化
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawnsdaddy committed Oct 9, 2024
1 parent 84f6f69 commit 32d2b60
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arknights_mower/solvers/base_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ def run(self) -> None:
if len(self.tasks) > 0:
# 找到时间最近的一次单个任务
self.task = self.tasks[0]
logger.debug(f"当前任务: {str(self.task)}")
else:
self.task = None
if self.task is not None and datetime.now() < self.task.time:
Expand All @@ -150,6 +149,7 @@ def run(self) -> None:
self.initialize_operators()
self.op_data.correct_dorm()
self.backup_plan_solver(PlanTriggerTiming.BEGINNING)
logger.debug("当前任务: " + ("||".join([str(t) for t in self.tasks])))
return super().run()

def transition(self) -> None:
Expand Down Expand Up @@ -1460,7 +1460,6 @@ def plan_solver(self):
except Exception as e:
logger.exception(e)
# 如果下个 普通任务 >5 分钟则补全宿舍
logger.debug("tasks: " + ("||".join([str(t) for t in self.tasks])))
if self.find_next_task(datetime.now() + timedelta(seconds=15)):
logger.info("有其他任务,跳过宿舍纠错")
return
Expand Down

0 comments on commit 32d2b60

Please sign in to comment.