|
|
|
@ -1857,9 +1857,13 @@ public class DocApiController extends BaseController { |
|
|
|
|
|
|
|
//如果中途嘎了java等待,然后20分钟去访问mysql时间最后一条数据
|
|
|
|
} |
|
|
|
|
|
|
|
public static Integer gopythonStatus = 0; |
|
|
|
public void goPython(ZhyTaskInfo info, List<Map<String, Object>> searchItems,String userId) |
|
|
|
throws JsonProcessingException, InterruptedException { |
|
|
|
if (gopythonStatus==1){ |
|
|
|
return; |
|
|
|
} |
|
|
|
gopythonStatus = 1; |
|
|
|
List<String> keywords = new ArrayList<>(); |
|
|
|
keywords.add(info.getName1()); |
|
|
|
if(info.getName2()!=null){ |
|
|
|
@ -1868,6 +1872,7 @@ public void goPython(ZhyTaskInfo info, List<Map<String, Object>> 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<Map<String, Object>> searchItems,Str |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
gopythonStatus = 0; |
|
|
|
System.out.println("goPython 流程结束。"); |
|
|
|
} |
|
|
|
public List<Long> getIdsByGroupAndType( |
|
|
|
|