修改超时时间
parent
a1d2560157
commit
e0a92000ab
|
@ -18,6 +18,8 @@ import com.muyu.etl.domain.DataValue;
|
|||
import com.muyu.remote.feign.DatasourceFeign;
|
||||
import com.muyu.remote.feign.RuleFeign;
|
||||
import com.muyu.rule.common.domain.DataValueFie;
|
||||
import com.muyu.rule.common.domain.DataValueRow;
|
||||
import com.muyu.rule.common.domain.DataValueRows;
|
||||
import com.muyu.rule.common.domain.RuleEngineVersion;
|
||||
import com.muyu.task.server.mapper.TaskInfoMapper;
|
||||
import com.muyu.task.server.service.*;
|
||||
|
@ -401,9 +403,13 @@ public class TaskInfoServiceImpl extends ServiceImpl<TaskInfoMapper, TaskInfo> i
|
|||
log.info(finalCurrentFuture);
|
||||
Callable<DataValue[][]> task = () -> {
|
||||
DataValue[][] prevResult = finalCurrentFuture.get();
|
||||
HashSet<Integer> set = new HashSet<>();
|
||||
//log.info(data.getClassName());
|
||||
if (data.getRuleId().equals("3")) {
|
||||
|
||||
DataValueRows dataValueRows = new DataValueRows();
|
||||
dataValueRows.setDataValue(prevResult);
|
||||
dataValueRows.setKey(nodeRule.getConfig());
|
||||
ruleConfig.DataSetEngine(data.getClassName(),dataValueRows);
|
||||
}
|
||||
if (data.getRuleId().equals("1")) {
|
||||
for (DataValue[] values : prevResult) {
|
||||
|
@ -414,7 +420,9 @@ public class TaskInfoServiceImpl extends ServiceImpl<TaskInfoMapper, TaskInfo> i
|
|||
dataValueFie.setDataValue(value);
|
||||
dataValueFie.setKey(nodeRule.getConfig());
|
||||
//DataValue dataValue = loadEngineClass.testEngine(data.getClassName(), value);
|
||||
ruleConfig.testEngine(data.getClassName(),dataValueFie);
|
||||
Result<DataValue> dataValueResult = ruleConfig.testEngine(data.getClassName(), dataValueFie);
|
||||
DataValue data1 = dataValueResult.getData();
|
||||
value=data1;
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
|
@ -423,16 +431,23 @@ public class TaskInfoServiceImpl extends ServiceImpl<TaskInfoMapper, TaskInfo> i
|
|||
|
||||
}
|
||||
if (data.getRuleId().equals("2")) {
|
||||
// for (DataValue[] values : prevResult) {
|
||||
// for (DataValue value : values) {
|
||||
// log.info(value.getValue());
|
||||
// Result result1 = ruleFeign.testEngine(data.getClassName(), value);
|
||||
// log.info(result1);
|
||||
// }
|
||||
// }
|
||||
|
||||
for (int i = 0; i < prevResult.length; i++) {
|
||||
DataValueRow valueRow = new DataValueRow();
|
||||
valueRow.setDataValue(prevResult[i]);
|
||||
valueRow.setKey(nodeRule.getConfig());
|
||||
Result<DataValue[]> result1 = ruleConfig.testEngine(data.getClassName(), valueRow);
|
||||
if (result1.getCode()==200){
|
||||
DataValue[] result1Data = result1.getData();
|
||||
prevResult[i]=result1Data;
|
||||
}else {
|
||||
set.add(i);
|
||||
}
|
||||
return prevResult;
|
||||
}
|
||||
}
|
||||
List<DataValue[]> listArrays = Arrays.stream(prevResult).toList();
|
||||
listArrays.removeAll(set);
|
||||
DataValue[][] array = (DataValue[][]) listArrays.toArray();
|
||||
return array;
|
||||
};
|
||||
|
||||
// 提交任务并更新当前Future
|
||||
|
|
Loading…
Reference in New Issue