master
周文涛 2 years ago
parent 82cd93d232
commit 03e46c3c39

@ -219,8 +219,8 @@ public class ApiController {
ocrIdentifyDetailService.remove(new LambdaQueryWrapper<OcrIdentifyDetail>().in(OcrIdentifyDetail::getIdentifyId,identifyIdList)); ocrIdentifyDetailService.remove(new LambdaQueryWrapper<OcrIdentifyDetail>().in(OcrIdentifyDetail::getIdentifyId,identifyIdList));
for (OcrIdentify ocrIdentify : list) { for (OcrIdentify ocrIdentify : list) {
log.info("打印ocrIdentifyId:"+ocrIdentify.getId()); log.info("打印ocrIdentifyId:"+ocrIdentify.getId());
//List<String> identifyUrlList = FileOUtils.fileLists(null, ocrIdentify.getIdentifyUrl()); List<String> identifyUrlList = FileOUtils.fileLists(null, ocrIdentify.getIdentifyUrl());
List<String> identifyUrlList = Arrays.asList("1","2"); //List<String> identifyUrlList = Arrays.asList("1","2");
taskService.postSemantic(ocrIdentify,identifyUrlList); taskService.postSemantic(ocrIdentify,identifyUrlList);
} }
} }

@ -124,7 +124,8 @@ public class HandleTransInit implements ApplicationRunner {
JSONObject requestBody = new JSONObject(); JSONObject requestBody = new JSONObject();
requestBody.put("task_id", task_id); requestBody.put("task_id", task_id);
requestBody.put("img_path", image); requestBody.put("img_path", image);
//更新主任务,正在识别中. //nohup python app.py & tail -f nohup.out &
//更新主任务,正在识别中. 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); JSONObject semanticResponseJson = RestUtil.post(OcrConstant.api_test2_identify_url, requestBody);
semanticResponseJson.put("identifyId", masterTaskId); semanticResponseJson.put("identifyId", masterTaskId);
@ -150,8 +151,6 @@ public class HandleTransInit implements ApplicationRunner {
} else { } else {
Thread.sleep(2000l); Thread.sleep(2000l);
} }
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
} }

Loading…
Cancel
Save