|
|
|
@@ -42,8 +42,9 @@ public class MLStatusTask { |
|
|
|
for (MachineLearnIns ins : insList) { |
|
|
|
//当原本状态为null或非终止态时才调用argo接口 |
|
|
|
try { |
|
|
|
Long userId = resourceOccupyDao.getResourceOccupyByTask(Constant.TaskType_ML, ins.getMachineLearnId(), ins.getId(), null).get(0).getUserId(); |
|
|
|
if (userId != null) { |
|
|
|
List<ResourceOccupy> resourceOccupys = resourceOccupyDao.getResourceOccupyByTask(Constant.TaskType_ML, ins.getMachineLearnId(), ins.getId(), null); |
|
|
|
if (!resourceOccupys.isEmpty()) { |
|
|
|
Long userId = resourceOccupys.get(0).getUserId(); |
|
|
|
if (resourceOccupyDao.getUserCredit(userId) <= 0) { |
|
|
|
ins.setStatus(Constant.Failed); |
|
|
|
machineLearnInsService.terminateMLIns(ins.getId()); |
|
|
|
|