基建选人异常时先选非Free干员再重启
All checks were successful
ci/woodpecker/push/check_format Pipeline was successful
All checks were successful
ci/woodpecker/push/check_format Pipeline was successful
This commit is contained in:
parent
e06e0a7fad
commit
d71e7bf0d0
1 changed files with 8 additions and 6 deletions
|
@ -1843,8 +1843,7 @@ class BaseSchedulerSolver(BaseSolver, BaseMixin):
|
||||||
):
|
):
|
||||||
agents[idx] = current_free.name
|
agents[idx] = current_free.name
|
||||||
agent = copy.deepcopy(agents)
|
agent = copy.deepcopy(agents)
|
||||||
agent = self.dedup_move_free_to_end(agent)
|
agent, fatal_error = self.dedup_move_free_to_end(agent)
|
||||||
logger.info(f"安排干员 :{agent}")
|
|
||||||
# 在 agent 中 'Free' 表示任意空闲干员
|
# 在 agent 中 'Free' 表示任意空闲干员
|
||||||
|
|
||||||
free_num = agent.count("Free")
|
free_num = agent.count("Free")
|
||||||
|
@ -1865,6 +1864,8 @@ class BaseSchedulerSolver(BaseSolver, BaseMixin):
|
||||||
1,
|
1,
|
||||||
)
|
)
|
||||||
RIIC_ChooseSolver().run(room, agent, wait_confirm)
|
RIIC_ChooseSolver().run(room, agent, wait_confirm)
|
||||||
|
if fatal_error:
|
||||||
|
raise BaseSchedulerFatalError
|
||||||
# 只选择在列表里面的
|
# 只选择在列表里面的
|
||||||
# 替换组小于20才休息,防止进入就满心情进行网络连接
|
# 替换组小于20才休息,防止进入就满心情进行网络连接
|
||||||
if free_num:
|
if free_num:
|
||||||
|
@ -2189,10 +2190,11 @@ class BaseSchedulerSolver(BaseSolver, BaseMixin):
|
||||||
continue
|
continue
|
||||||
result.append(operator)
|
result.append(operator)
|
||||||
result += ["Free"] * (len(input_list) - len(result))
|
result += ["Free"] * (len(input_list) - len(result))
|
||||||
if input_list != result:
|
if input_list == result:
|
||||||
logger.error(f"选人异常:{input_list}")
|
logger.info(f"安排干员 :{input_list}")
|
||||||
raise BaseSchedulerFatalError
|
return input_list, False
|
||||||
return input_list
|
logger.error(f"选人异常:{input_list}")
|
||||||
|
return result, True
|
||||||
|
|
||||||
def agent_arrange(self, plan: tp.BasePlan, get_time=False):
|
def agent_arrange(self, plan: tp.BasePlan, get_time=False):
|
||||||
logger.info("基建:排班")
|
logger.info("基建:排班")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue