Browse Source

60分钟执行一次清除

LAPTOP-BJJ3IV5R\SIWEI 8 months ago
parent
commit
4ad1c82fc0

+ 2 - 2
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/task/AnalyseDBSchedule.java

@@ -18,7 +18,7 @@ import java.util.List;
 @Slf4j
 public class AnalyseDBSchedule {
     //间隔时间 单位ms
-    public static final long TIME_INTERVAL = 10 * 60 * 1 * 1000;
+    public static final long TIME_INTERVAL = 60 * 60 * 1 * 1000;
 
     @Resource
     private TableDataMapper tableDataMapper;
@@ -29,7 +29,7 @@ public class AnalyseDBSchedule {
     @Scheduled(fixedDelay = TIME_INTERVAL)
     public void AnalyseDBDropStatus() {
         String TEMPORARY = "temporary";
-        long tenMinutesInMillis = 10 * 60 * 1000; // 10分钟的毫秒数
+        long tenMinutesInMillis = 60 * 60 * 1000; // 10分钟的毫秒数
         Long timeMillis = System.currentTimeMillis() - tenMinutesInMillis;
         String tenMinutesTableName = TEMPORARY + "_" + timeMillis;
         List<String> tableList = tableDataMapper.getVectorTableS();