Commit 9fe2d881ea89fe49f181e623d0301d98e6024920
1 parent
fd641851
update...
Showing
2 changed files
with
8 additions
and
1 deletions
src/main/java/com/bsth/Application.java
| @@ -17,7 +17,7 @@ import java.util.concurrent.ScheduledExecutorService; | @@ -17,7 +17,7 @@ import java.util.concurrent.ScheduledExecutorService; | ||
| 17 | @SpringBootApplication | 17 | @SpringBootApplication |
| 18 | public class Application extends SpringBootServletInitializer { | 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 | @Override | 22 | @Override |
| 23 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { | 23 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { |
src/main/java/com/bsth/XDApplication.java
| 1 | package com.bsth; | 1 | package com.bsth; |
| 2 | 2 | ||
| 3 | import com.bsth.data.BasicData; | 3 | import com.bsth.data.BasicData; |
| 4 | +import com.bsth.data.LineVersionsData; | ||
| 4 | import com.bsth.data.ThreadMonotor; | 5 | import com.bsth.data.ThreadMonotor; |
| 5 | import com.bsth.data.car_out_info.UpdateDBThread; | 6 | import com.bsth.data.car_out_info.UpdateDBThread; |
| 6 | import com.bsth.data.directive.DirectivesPstThread; | 7 | import com.bsth.data.directive.DirectivesPstThread; |
| @@ -71,6 +72,9 @@ public class XDApplication implements CommandLineRunner { | @@ -71,6 +72,9 @@ public class XDApplication implements CommandLineRunner { | ||
| 71 | @Autowired | 72 | @Autowired |
| 72 | OfflineMonitorThread offlineMonitorThread; | 73 | OfflineMonitorThread offlineMonitorThread; |
| 73 | 74 | ||
| 75 | + @Autowired | ||
| 76 | + LineVersionsData lineVersionsData; | ||
| 77 | + | ||
| 74 | private static long timeDiff; | 78 | private static long timeDiff; |
| 75 | private static long timeDiffTraffic; | 79 | private static long timeDiffTraffic; |
| 76 | 80 | ||
| @@ -160,5 +164,8 @@ public class XDApplication implements CommandLineRunner { | @@ -160,5 +164,8 @@ public class XDApplication implements CommandLineRunner { | ||
| 160 | sexec.scheduleAtFixedRate(submitToTrafficManage, timeDiffTraffic / 1000, 60 * 60 * 24, TimeUnit.SECONDS); | 164 | sexec.scheduleAtFixedRate(submitToTrafficManage, timeDiffTraffic / 1000, 60 * 60 * 24, TimeUnit.SECONDS); |
| 161 | //计算油、公里加注 | 165 | //计算油、公里加注 |
| 162 | sexec.scheduleAtFixedRate(calcOilThread, timeDiff / 1000, 60 * 60 * 24, TimeUnit.SECONDS); | 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 | } |