修改分页条数
parent
b656312de9
commit
155f69db3b
|
@ -391,18 +391,19 @@ public class TaskInfoServiceImpl extends ServiceImpl<TaskInfoMapper, TaskInfo> i
|
||||||
List<NodeRule> list = nodeRuleService.list(wrapper);
|
List<NodeRule> list = nodeRuleService.list(wrapper);
|
||||||
// 提交第一个任务
|
// 提交第一个任务
|
||||||
Future<DataValue[][]> currentFuture = executor.submit(tasks.poll());
|
Future<DataValue[][]> currentFuture = executor.submit(tasks.poll());
|
||||||
for (NodeRule nodeRule : list) {
|
if (!CollectionUtils.isEmpty(list)) {
|
||||||
Result<RuleEngineVersion> result = ruleFeign.findVersionById(nodeRule.getRuleId());
|
for (NodeRule nodeRule : list) {
|
||||||
RuleEngineVersion data = result.getData();
|
Result<RuleEngineVersion> result = ruleFeign.findVersionById(nodeRule.getRuleId());
|
||||||
final Future<DataValue[][]> finalCurrentFuture = currentFuture;
|
RuleEngineVersion data = result.getData();
|
||||||
log.info(finalCurrentFuture);
|
final Future<DataValue[][]> finalCurrentFuture = currentFuture;
|
||||||
Callable<DataValue[][]> task = () -> {
|
log.info(finalCurrentFuture);
|
||||||
DataValue[][] prevResult = finalCurrentFuture.get();
|
Callable<DataValue[][]> task = () -> {
|
||||||
log.info(data.getClassName());
|
DataValue[][] prevResult = finalCurrentFuture.get();
|
||||||
if (data.getRuleId().equals("3")) {
|
log.info(data.getClassName());
|
||||||
|
if (data.getRuleId().equals("3")) {
|
||||||
|
|
||||||
}
|
}
|
||||||
if (data.getRuleId().equals("1")) {
|
if (data.getRuleId().equals("1")) {
|
||||||
// for (DataValue[] values : prevResult) {
|
// for (DataValue[] values : prevResult) {
|
||||||
// for (DataValue value : values) {
|
// for (DataValue value : values) {
|
||||||
// log.info(value.getValue());
|
// log.info(value.getValue());
|
||||||
|
@ -411,8 +412,8 @@ public class TaskInfoServiceImpl extends ServiceImpl<TaskInfoMapper, TaskInfo> i
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
if (data.getRuleId().equals("2")) {
|
if (data.getRuleId().equals("2")) {
|
||||||
// for (DataValue[] values : prevResult) {
|
// for (DataValue[] values : prevResult) {
|
||||||
// for (DataValue value : values) {
|
// for (DataValue value : values) {
|
||||||
// log.info(value.getValue());
|
// log.info(value.getValue());
|
||||||
|
@ -421,23 +422,25 @@ public class TaskInfoServiceImpl extends ServiceImpl<TaskInfoMapper, TaskInfo> i
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
return prevResult;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 提交任务并更新当前Future
|
||||||
|
currentFuture = executor.submit(task);
|
||||||
|
|
||||||
|
// 等待当前任务完成
|
||||||
|
try {
|
||||||
|
currentFuture.get();
|
||||||
|
} catch (InterruptedException | ExecutionException e) {
|
||||||
|
Thread.currentThread().interrupt();
|
||||||
|
System.out.println("Task execution failed: " + e.getMessage());
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return prevResult;
|
|
||||||
};
|
|
||||||
|
|
||||||
// 提交任务并更新当前Future
|
|
||||||
currentFuture = executor.submit(task);
|
|
||||||
|
|
||||||
// 等待当前任务完成
|
|
||||||
try {
|
|
||||||
currentFuture.get();
|
|
||||||
} catch (InterruptedException | ExecutionException e) {
|
|
||||||
Thread.currentThread().interrupt();
|
|
||||||
System.out.println("Task execution failed: " + e.getMessage());
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
DataValue[][] afterFilteringDataValue = currentFuture.get();
|
DataValue[][] afterFilteringDataValue = currentFuture.get();
|
||||||
for (DataValue[] datum : afterFilteringDataValue) {
|
for (DataValue[] datum : afterFilteringDataValue) {
|
||||||
|
|
Loading…
Reference in New Issue