Commit 9fe2d881ea89fe49f181e623d0301d98e6024920

Authored by 潘钊
1 parent fd641851

update...

src/main/java/com/bsth/Application.java
... ... @@ -17,7 +17,7 @@ import java.util.concurrent.ScheduledExecutorService;
17 17 @SpringBootApplication
18 18 public class Application extends SpringBootServletInitializer {
19 19  
20   - public static ScheduledExecutorService mainServices = Executors.newScheduledThreadPool(17);
  20 + public static ScheduledExecutorService mainServices = Executors.newScheduledThreadPool(18);
21 21  
22 22 @Override
23 23 protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
... ...
src/main/java/com/bsth/XDApplication.java
1 1 package com.bsth;
2 2  
3 3 import com.bsth.data.BasicData;
  4 +import com.bsth.data.LineVersionsData;
4 5 import com.bsth.data.ThreadMonotor;
5 6 import com.bsth.data.car_out_info.UpdateDBThread;
6 7 import com.bsth.data.directive.DirectivesPstThread;
... ... @@ -71,6 +72,9 @@ public class XDApplication implements CommandLineRunner {
71 72 @Autowired
72 73 OfflineMonitorThread offlineMonitorThread;
73 74  
  75 + @Autowired
  76 + LineVersionsData lineVersionsData;
  77 +
74 78 private static long timeDiff;
75 79 private static long timeDiffTraffic;
76 80  
... ... @@ -160,5 +164,8 @@ public class XDApplication implements CommandLineRunner {
160 164 sexec.scheduleAtFixedRate(submitToTrafficManage, timeDiffTraffic / 1000, 60 * 60 * 24, TimeUnit.SECONDS);
161 165 //计算油、公里加注
162 166 sexec.scheduleAtFixedRate(calcOilThread, timeDiff / 1000, 60 * 60 * 24, TimeUnit.SECONDS);
  167 +
  168 + //线路版本更新
  169 + sexec.scheduleWithFixedDelay(lineVersionsData, 60 * 5, 60 * 15, TimeUnit.SECONDS);
163 170 }
164 171 }
... ...