|
@@ -469,7 +469,7 @@ public class TaskDomainService {
|
|
|
}
|
|
|
// 1 判断有没有用户目录,没有则复制
|
|
|
String evaluationDirectoryOfUser = linuxTempPath + "scene/evaluation/" + sceneEvaluationComputeParams.get(0).getTaskId() + "/";
|
|
|
- String scriptsPath = evaluationDirectoryOfUser + "scripts/";
|
|
|
+ String scriptsPath = evaluationDirectoryOfUser + "scripts";
|
|
|
if (!new File(evaluationDirectoryOfUser).exists()) {
|
|
|
// 1 将场景评价规则脚本保存到 script 目录
|
|
|
FileUtil.createDirectory(scriptsPath);
|
|
@@ -478,7 +478,7 @@ public class TaskDomainService {
|
|
|
if (sceneEvaluationRulePO.getScriptPath() == null) {
|
|
|
return false;
|
|
|
}
|
|
|
- String pyMainPath = scriptsPath + "/" + sceneEvaluationRulePO.getRuleId() + ".py";
|
|
|
+ String pyMainPath = scriptsPath + "/" + sceneEvaluationRulePO.getRuleId();
|
|
|
if (!new File(pyMainPath).exists()) {
|
|
|
MinioUtil.downloadToFile(minioClient, bucketName, sceneEvaluationRulePO.getScriptPath(), pyMainPath);
|
|
|
try {
|
|
@@ -543,7 +543,7 @@ public class TaskDomainService {
|
|
|
Runtime r = Runtime.getRuntime();
|
|
|
Process p = null;
|
|
|
try {
|
|
|
- p = r.exec(sceneEvaluationCommand, null, new File(evaluationDirectoryOfUser + "result"));
|
|
|
+ p = r.exec(sceneEvaluationCommand);
|
|
|
} catch (IOException e) {
|
|
|
log.error("执行场景评价脚本失败,脚本命令为: " + sceneEvaluationCommand, e);
|
|
|
return false;
|