parent
2b77bb473b
commit
4c05dd7415
|
@ -265,13 +265,11 @@ public class HighAvailablePoolImpl extends CurrentLoadSubject implements
|
|||
if (allocationFinish(load)) {
|
||||
break;
|
||||
}
|
||||
if (this.queryAgentStatus(agent) == null || agent.isInUse()
|
||||
|| agent.getRemainLoad() != agent.getMaxLoad()) {
|
||||
if (agent.isInUse()) {
|
||||
continue;
|
||||
}
|
||||
loadForRunCurrent = getMin(load, agent.getRemainLoad());
|
||||
agent.bookTest(loadForRunCurrent);
|
||||
this.getAgentRepository().update(agent);
|
||||
runScenarioResultModel = this.getAgentMessenger().bookTest(agent,
|
||||
loadForRunCurrent);
|
||||
if (runScenarioResultModel == null
|
||||
|
@ -279,6 +277,7 @@ public class HighAvailablePoolImpl extends CurrentLoadSubject implements
|
|||
logger.error(runScenarioResultModel == null ? "runScenarioResultModel is null"
|
||||
: "runScenarioResultModel.getRunId()"
|
||||
+ runScenarioResultModel.getRunId());
|
||||
agent.backLoad(loadForRunCurrent);
|
||||
continue;
|
||||
}
|
||||
load -= loadForRunCurrent;
|
||||
|
@ -289,6 +288,7 @@ public class HighAvailablePoolImpl extends CurrentLoadSubject implements
|
|||
runScenarioResultModel.getRunId());
|
||||
result.add(runningAgentWithouRunningScript);
|
||||
this.addABlotter(runningAgentWithouRunningScript);
|
||||
this.getAgentRepository().update(agent);
|
||||
}
|
||||
if (!allocationFinish(load)) {
|
||||
logger.error("allocationUnfinished, remain " + load
|
||||
|
|
Loading…
Reference in New Issue