Pārlūkot izejas kodu

修改超时时间为一天

欧阳劲驰 3 mēneši atpakaļ
vecāks
revīzija
7875b3059c

+ 3 - 1
src/main/java/com/shkpr/service/alambizplugin/bizservice/GisSurveyBizService.java

@@ -129,11 +129,13 @@ public class GisSurveyBizService {
     /**
      * 过期任务
      * <p>用于检查和使任务过期</p>
+     *
+     * @param ttl 超时时间(分钟)
      */
     public void expireResult(long ttl) {
         //获取超时的id
         List<GisSurveyCheckTaskId> taskIds = TIME_CACHE.entrySet().stream()
-                .filter(entry -> Duration.between(entry.getValue(), LocalDateTime.now()).toMillis() > ttl)
+                .filter(entry -> Duration.between(entry.getValue(), LocalDateTime.now()).toMinutes() > ttl)
                 .map(Map.Entry::getKey)
                 .collect(Collectors.toList());
         //停止超时的任务并删除任务缓存

+ 2 - 2
src/main/resources/application.properties

@@ -139,8 +139,8 @@ fdfs.pool.max-wait-millis=5000
 des.proxy.fdfs=http://116.63.130.83:9999
 
 #=============系统检查========================
-#超时时间(毫秒)
-system-check.ttl= 1800000
+#超时时间(分钟)
+system-check.ttl= 1440
 #检查周期(毫秒)
 system-check.ttl-check-interval= 60000