|
|
@ -130,7 +130,19 @@ public class HandleTransInit implements ApplicationRunner {
|
|
|
|
//nohup python app.py & tail -f nohup.out &
|
|
|
|
//nohup python app.py & tail -f nohup.out &
|
|
|
|
//更新主任务,正在识别中. conda activate ai
|
|
|
|
//更新主任务,正在识别中. conda activate ai
|
|
|
|
ocrIdentifyService.updateMasterTaskStartTime(task_id.split("_")[0]);
|
|
|
|
ocrIdentifyService.updateMasterTaskStartTime(task_id.split("_")[0]);
|
|
|
|
JSONObject semanticResponseJson = RestUtil.post(OcrConstant.api_test2_identify_url, requestBody);
|
|
|
|
boolean flag=false;
|
|
|
|
|
|
|
|
JSONObject semanticResponseJson =null;
|
|
|
|
|
|
|
|
while (!flag){
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
semanticResponseJson = RestUtil.post(OcrConstant.api_test2_identify_url, requestBody);
|
|
|
|
|
|
|
|
if (semanticResponseJson!=null) {
|
|
|
|
|
|
|
|
flag=true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}catch (org.springframework.web.client.ResourceAccessException e){
|
|
|
|
|
|
|
|
log.error(e.getMessage());
|
|
|
|
|
|
|
|
log.error("正在重试...");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
semanticResponseJson.put("identifyId", masterTaskId);
|
|
|
|
semanticResponseJson.put("identifyId", masterTaskId);
|
|
|
|
log.info("ocr识别返回数据:");
|
|
|
|
log.info("ocr识别返回数据:");
|
|
|
|
log.info(semanticResponseJson.toJSONString());
|
|
|
|
log.info(semanticResponseJson.toJSONString());
|
|
|
|