From a37f8e16eebb4417d9d5388502b2edf3d5fbab3b Mon Sep 17 00:00:00 2001 From: jzy <928294064@qq.com> Date: Tue, 16 Sep 2025 22:27:07 +0800 Subject: [PATCH] yangshi --- .../src/main/java/com/ruoyi/api/controller/DocApiController.java | 9 +++++++-- ruoyi-ui/src/views/system/fileManage/index.vue | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ruoyi-api/src/main/java/com/ruoyi/api/controller/DocApiController.java b/ruoyi-api/src/main/java/com/ruoyi/api/controller/DocApiController.java index 3c80635..8dc9a2e 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/api/controller/DocApiController.java +++ b/ruoyi-api/src/main/java/com/ruoyi/api/controller/DocApiController.java @@ -1857,9 +1857,13 @@ public class DocApiController extends BaseController { //如果中途嘎了java等待,然后20分钟去访问mysql时间最后一条数据 } - +public static Integer gopythonStatus = 0; public void goPython(ZhyTaskInfo info, List> searchItems,String userId) throws JsonProcessingException, InterruptedException { + if (gopythonStatus==1){ + return; + } + gopythonStatus = 1; List keywords = new ArrayList<>(); keywords.add(info.getName1()); if(info.getName2()!=null){ @@ -1868,6 +1872,7 @@ public void goPython(ZhyTaskInfo info, List> searchItems,Str int maxRetries = 3; // 最大重试次数,避免无限重试 int retryCount = 0; Gson gson = new Gson(); + while (retryCount <= maxRetries) { try { // 构建请求数据 @@ -1968,7 +1973,7 @@ public void goPython(ZhyTaskInfo info, List> searchItems,Str continue; } } - + gopythonStatus = 0; System.out.println("goPython 流程结束。"); } public List getIdsByGroupAndType( diff --git a/ruoyi-ui/src/views/system/fileManage/index.vue b/ruoyi-ui/src/views/system/fileManage/index.vue index d5cc9e8..ba062ad 100644 --- a/ruoyi-ui/src/views/system/fileManage/index.vue +++ b/ruoyi-ui/src/views/system/fileManage/index.vue @@ -378,7 +378,7 @@ - +