Commit 13b84537 authored by 霍传世's avatar 霍传世

多线程测试生成PDF

parent 59843676
...@@ -147,7 +147,7 @@ public class GeneratorAllTypePdfByProvinceController { ...@@ -147,7 +147,7 @@ public class GeneratorAllTypePdfByProvinceController {
.concat(" ").concat(fileName); .concat(" ").concat(fileName);
synthesisSchoolReportParameter.setCommand(command); synthesisSchoolReportParameter.setCommand(command);
synthesisSchoolReportParameter.setPrefix("/myworkSpace/basic/"); synthesisSchoolReportParameter.setPrefix("/myworkSpace/basic/");
fileToUrl.put(fileName.replace("/myworkSpace/basic/",""),"PdfSubjectTest/"+fileName.replace("/myworkSpace/subject/","")); fileToUrl.put(fileName.replace("/myworkSpace/basic/",""),"PdfTest/"+fileName.replace("/myworkSpace/subject/",""));
}else{ }else{
String command = "node /myworkSpace/puppeteer.js \"http://localhost:8080/pdf/basic?province=condition5&school=condition1&examId=condition4&region=非改革&branch=condition3&subjectType=常规\" pdf "; String command = "node /myworkSpace/puppeteer.js \"http://localhost:8080/pdf/basic?province=condition5&school=condition1&examId=condition4&region=非改革&branch=condition3&subjectType=常规\" pdf ";
String fileName = "/myworkSpace/basic/"+synthesisSchoolReportParameter.getRegion()+synthesisSchoolReportParameter.getProvince()+synthesisSchoolReportParameter.getSchool()+synthesisSchoolReportParameter.getExamId()+".pdf"; String fileName = "/myworkSpace/basic/"+synthesisSchoolReportParameter.getRegion()+synthesisSchoolReportParameter.getProvince()+synthesisSchoolReportParameter.getSchool()+synthesisSchoolReportParameter.getExamId()+".pdf";
...@@ -155,7 +155,7 @@ public class GeneratorAllTypePdfByProvinceController { ...@@ -155,7 +155,7 @@ public class GeneratorAllTypePdfByProvinceController {
.concat(" ").concat(fileName); .concat(" ").concat(fileName);
synthesisSchoolReportParameter.setCommand(command); synthesisSchoolReportParameter.setCommand(command);
synthesisSchoolReportParameter.setPrefix("/myworkSpace/basic/"); synthesisSchoolReportParameter.setPrefix("/myworkSpace/basic/");
fileToUrl.put(fileName.replace("/myworkSpace/basic/",""),"PdfSubjectTest/"+fileName.replace("/myworkSpace/subject/","")); fileToUrl.put(fileName.replace("/myworkSpace/basic/",""),"PdfTest/"+fileName.replace("/myworkSpace/subject/",""));
} }
} }
...@@ -229,7 +229,7 @@ public class GeneratorAllTypePdfByProvinceController { ...@@ -229,7 +229,7 @@ public class GeneratorAllTypePdfByProvinceController {
Map<String, List<ClassBasicReportParameters>> classSubjectReport = synthesisClassSubjectReportParameters.stream().collect(Collectors.groupingBy(ClassBasicReportParameters::getProvince)); Map<String, List<ClassBasicReportParameters>> classSubjectReport = synthesisClassSubjectReportParameters.stream().collect(Collectors.groupingBy(ClassBasicReportParameters::getProvince));
ExecutorService executorService = Executors.newFixedThreadPool(5); ExecutorService executorService = Executors.newFixedThreadPool(8);
...@@ -460,7 +460,7 @@ public class GeneratorAllTypePdfByProvinceController { ...@@ -460,7 +460,7 @@ public class GeneratorAllTypePdfByProvinceController {
filePrefix = parametersTwo.getPrefix(); filePrefix = parametersTwo.getPrefix();
} }
logger.info("RetryCommand:loading"); logger.info("RetryCommand:ls");
ProcessBuilder processBuilderClassSubject = new ProcessBuilder(); ProcessBuilder processBuilderClassSubject = new ProcessBuilder();
processBuilderClassSubject.command("bash", "-c", command); processBuilderClassSubject.command("bash", "-c", command);
processBuilderClassSubject.redirectErrorStream(true); // 合并标准输出和错误输出 processBuilderClassSubject.redirectErrorStream(true); // 合并标准输出和错误输出
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment