|
@@ -570,6 +570,7 @@ public class ProjectConsumer {
|
|
|
//4-6 发送成功过的同时创建 pod.yaml 文件并把文件地址存到 redis
|
|
|
// 选一个 count 最少的 node
|
|
|
String currentNodeName = "";
|
|
|
+ NodeTO currentNodeTO = null;
|
|
|
int currentCount = Integer.MAX_VALUE;
|
|
|
log.info("parseProject() 各节点已经预定的任务个数为:" + nodeListToCount);
|
|
|
for (NodeTO nodeTO : nodeListToCount) {
|
|
@@ -578,9 +579,10 @@ public class ProjectConsumer {
|
|
|
if (tempCount < currentCount) {
|
|
|
currentCount = tempCount;
|
|
|
currentNodeName = tempNodeName;
|
|
|
- nodeTO.setCount(tempCount + 1);
|
|
|
+ currentNodeTO = nodeTO;
|
|
|
}
|
|
|
}
|
|
|
+ currentNodeTO.setCount(currentNodeTO.getCount() + 1);
|
|
|
|
|
|
log.info("项目 " + projectId + " 准备创建 yaml:是否使用 gpu " + isChoiceGpu + ",当前节点名称为:" + currentNodeName + ",当前节点已创建 yaml 个数为:" + currentCount);
|
|
|
String tempYaml = projectManager.createTempYaml(projectId, vehicleConfigId, modelType, algorithmDockerImage, currentNodeName, partition, offset, isChoiceGpu);
|