Commit 388978b8b3b3c3b01cc322163e739acb72e8647d
1 parent
2248fc4a
update...
Showing
1 changed file
with
12 additions
and
4 deletions
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; | ||
| 5 | import com.bsth.data.ThreadMonotor; | 4 | import com.bsth.data.ThreadMonotor; |
| 6 | import com.bsth.data.car_out_info.UpdateDBThread; | 5 | import com.bsth.data.car_out_info.UpdateDBThread; |
| 7 | import com.bsth.data.directive.DirectivesPstThread; | 6 | import com.bsth.data.directive.DirectivesPstThread; |
| 8 | import com.bsth.data.forecast.SampleTimeDataLoader; | 7 | import com.bsth.data.forecast.SampleTimeDataLoader; |
| 9 | import com.bsth.data.gpsdata_v2.thread.GpsDataLoaderThread; | 8 | import com.bsth.data.gpsdata_v2.thread.GpsDataLoaderThread; |
| 10 | import com.bsth.data.gpsdata_v2.thread.OfflineMonitorThread; | 9 | import com.bsth.data.gpsdata_v2.thread.OfflineMonitorThread; |
| 10 | +import com.bsth.data.line_version.thread.FixedEnableVerionsThread; | ||
| 11 | import com.bsth.data.msg_queue.DirectivePushQueue; | 11 | import com.bsth.data.msg_queue.DirectivePushQueue; |
| 12 | import com.bsth.data.msg_queue.WebSocketPushQueue; | 12 | import com.bsth.data.msg_queue.WebSocketPushQueue; |
| 13 | import com.bsth.data.safe_driv.SafeDrivDataLoadThread; | 13 | import com.bsth.data.safe_driv.SafeDrivDataLoadThread; |
| @@ -73,8 +73,11 @@ public class XDApplication implements CommandLineRunner { | @@ -73,8 +73,11 @@ public class XDApplication implements CommandLineRunner { | ||
| 73 | @Autowired | 73 | @Autowired |
| 74 | OfflineMonitorThread offlineMonitorThread; | 74 | OfflineMonitorThread offlineMonitorThread; |
| 75 | 75 | ||
| 76 | + //@Autowired | ||
| 77 | + //LineVersionsData lineVersionsData; | ||
| 78 | + | ||
| 76 | @Autowired | 79 | @Autowired |
| 77 | - LineVersionsData lineVersionsData; | 80 | + FixedEnableVerionsThread fixedEnableVerionsThread; |
| 78 | 81 | ||
| 79 | @Autowired | 82 | @Autowired |
| 80 | SafeDrivDataLoadThread safeDrivDataLoadThread; | 83 | SafeDrivDataLoadThread safeDrivDataLoadThread; |
| @@ -126,7 +129,7 @@ public class XDApplication implements CommandLineRunner { | @@ -126,7 +129,7 @@ public class XDApplication implements CommandLineRunner { | ||
| 126 | //实际排班更新线程 | 129 | //实际排班更新线程 |
| 127 | //sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS); | 130 | //sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS); |
| 128 | //sexec.scheduleWithFixedDelay(autoExecScanThread, 100, 50, TimeUnit.SECONDS);//班次自动执行 | 131 | //sexec.scheduleWithFixedDelay(autoExecScanThread, 100, 50, TimeUnit.SECONDS);//班次自动执行 |
| 129 | - WebSocketPushQueue.start();//消息队列 -webSocket ,推送至线调web页面的 | 132 | + //WebSocketPushQueue.start();//消息队列 -webSocket ,推送至线调web页面的 |
| 130 | //实际排班延迟入库线程 | 133 | //实际排班延迟入库线程 |
| 131 | //sexec.scheduleWithFixedDelay(schedulePstThread, 60, 15, TimeUnit.SECONDS); | 134 | //sexec.scheduleWithFixedDelay(schedulePstThread, 60, 15, TimeUnit.SECONDS); |
| 132 | //班次修正日志延迟入库 | 135 | //班次修正日志延迟入库 |
| @@ -138,6 +141,8 @@ public class XDApplication implements CommandLineRunner { | @@ -138,6 +141,8 @@ public class XDApplication implements CommandLineRunner { | ||
| 138 | 141 | ||
| 139 | //安全驾驶 | 142 | //安全驾驶 |
| 140 | //sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 40, 30, TimeUnit.SECONDS); | 143 | //sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 40, 30, TimeUnit.SECONDS); |
| 144 | + | ||
| 145 | + //sexec.scheduleWithFixedDelay(fixedEnableVerionsThread, 20, 60 * 2 , TimeUnit.SECONDS); | ||
| 141 | } | 146 | } |
| 142 | 147 | ||
| 143 | public void prodInit(){ | 148 | public void prodInit(){ |
| @@ -175,6 +180,9 @@ public class XDApplication implements CommandLineRunner { | @@ -175,6 +180,9 @@ public class XDApplication implements CommandLineRunner { | ||
| 175 | sexec.scheduleAtFixedRate(calcOilThread, timeDiff / 1000, 60 * 60 * 24, TimeUnit.SECONDS); | 180 | sexec.scheduleAtFixedRate(calcOilThread, timeDiff / 1000, 60 * 60 * 24, TimeUnit.SECONDS); |
| 176 | 181 | ||
| 177 | //线路版本更新 | 182 | //线路版本更新 |
| 178 | - sexec.scheduleWithFixedDelay(lineVersionsData, 60 * 5, 60 * 15, TimeUnit.SECONDS); | 183 | + //sexec.scheduleWithFixedDelay(lineVersionsData, 60 * 5, 60 * 15, TimeUnit.SECONDS); |
| 184 | + | ||
| 185 | + //线路版本更新 | ||
| 186 | + sexec.scheduleWithFixedDelay(fixedEnableVerionsThread, 60 * 4, 60 * 2 , TimeUnit.SECONDS); | ||
| 179 | } | 187 | } |
| 180 | } | 188 | } |