Commit 28e471113a1bd66a5c7032187b5b67ce43d6bf13

Authored by 潘钊
1 parent 44091652

update...

src/main/java/com/bsth/XDApplication.java
@@ -5,10 +5,10 @@ import com.bsth.data.ThreadMonotor; @@ -5,10 +5,10 @@ import com.bsth.data.ThreadMonotor;
5 import com.bsth.data.car_out_info.UpdateDBThread; 5 import com.bsth.data.car_out_info.UpdateDBThread;
6 import com.bsth.data.directive.DirectivesPstThread; 6 import com.bsth.data.directive.DirectivesPstThread;
7 import com.bsth.data.forecast.SampleTimeDataLoader; 7 import com.bsth.data.forecast.SampleTimeDataLoader;
8 -import com.bsth.data.gpsdata.thread.GpsDataLoaderThread;  
9 -import com.bsth.data.gpsdata.thread.OfflineMonitorThread; 8 +import com.bsth.data.gpsdata_v2.thread.GpsDataLoaderThread;
10 import com.bsth.data.msg_queue.DirectivePushQueue; 9 import com.bsth.data.msg_queue.DirectivePushQueue;
11 import com.bsth.data.msg_queue.WebSocketPushQueue; 10 import com.bsth.data.msg_queue.WebSocketPushQueue;
  11 +import com.bsth.data.schedule.DayOfSchedule;
12 import com.bsth.data.schedule.auto_exec.AutoExecScanThread; 12 import com.bsth.data.schedule.auto_exec.AutoExecScanThread;
13 import com.bsth.data.schedule.edit_logs.SeiPstThread; 13 import com.bsth.data.schedule.edit_logs.SeiPstThread;
14 import com.bsth.data.schedule.late_adjust.ScheduleLateThread; 14 import com.bsth.data.schedule.late_adjust.ScheduleLateThread;
@@ -42,10 +42,6 @@ public class XDApplication implements CommandLineRunner { @@ -42,10 +42,6 @@ public class XDApplication implements CommandLineRunner {
42 @Autowired 42 @Autowired
43 UpdateDBThread fcxxUpdateThread; 43 UpdateDBThread fcxxUpdateThread;
44 @Autowired 44 @Autowired
45 - GpsDataLoaderThread gpsDataLoader;  
46 - @Autowired  
47 - OfflineMonitorThread offlineMonitorThread;  
48 - @Autowired  
49 ScheduleRefreshThread scheduleRefreshThread; 45 ScheduleRefreshThread scheduleRefreshThread;
50 @Autowired 46 @Autowired
51 SchedulePstThread schedulePstThread; 47 SchedulePstThread schedulePstThread;
@@ -68,6 +64,9 @@ public class XDApplication implements CommandLineRunner { @@ -68,6 +64,9 @@ public class XDApplication implements CommandLineRunner {
68 @Autowired 64 @Autowired
69 AutoExecScanThread autoExecScanThread; 65 AutoExecScanThread autoExecScanThread;
70 66
  67 + @Autowired
  68 + GpsDataLoaderThread gpsDataLoader;
  69 +
71 private static long timeDiff; 70 private static long timeDiff;
72 private static long timeDiffTraffic; 71 private static long timeDiffTraffic;
73 72
@@ -103,15 +102,15 @@ public class XDApplication implements CommandLineRunner { @@ -103,15 +102,15 @@ public class XDApplication implements CommandLineRunner {
103 } 102 }
104 } 103 }
105 104
106 - //@Autowired  
107 - //DayOfSchedule dayOfSchedule; 105 + @Autowired
  106 + DayOfSchedule dayOfSchedule;
108 public void devInit(){ 107 public void devInit(){
109 log.info("devInit..."); 108 log.info("devInit...");
110 ScheduledExecutorService sexec = Application.mainServices; 109 ScheduledExecutorService sexec = Application.mainServices;
111 //抓取GPS数据 110 //抓取GPS数据
112 gpsDataLoader.setFlag(-1); 111 gpsDataLoader.setFlag(-1);
113 //dayOfSchedule.dataRecovery(); 112 //dayOfSchedule.dataRecovery();
114 - //sexec.scheduleWithFixedDelay(gpsDataLoader, 30, 2, TimeUnit.SECONDS); 113 + //sexec.scheduleWithFixedDelay(gpsDataLoader, 60, 4, TimeUnit.SECONDS);
115 //实际排班更新线程 114 //实际排班更新线程
116 //sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS); 115 //sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS);
117 //sexec.scheduleWithFixedDelay(autoExecScanThread, 100, 50, TimeUnit.SECONDS);//班次自动执行 116 //sexec.scheduleWithFixedDelay(autoExecScanThread, 100, 50, TimeUnit.SECONDS);//班次自动执行
@@ -135,7 +134,7 @@ public class XDApplication implements CommandLineRunner { @@ -135,7 +134,7 @@ public class XDApplication implements CommandLineRunner {
135 sexec.scheduleWithFixedDelay(scheduleLateThread, 70, 30, TimeUnit.SECONDS);//检查班次误点 134 sexec.scheduleWithFixedDelay(scheduleLateThread, 70, 30, TimeUnit.SECONDS);//检查班次误点
136 sexec.scheduleWithFixedDelay(gpsDataLoader, 100, 2, TimeUnit.SECONDS);//抓取GPS数据 135 sexec.scheduleWithFixedDelay(gpsDataLoader, 100, 2, TimeUnit.SECONDS);//抓取GPS数据
137 136
138 - sexec.scheduleWithFixedDelay(offlineMonitorThread, 120, 60, TimeUnit.SECONDS);//GPS设备掉离线 137 + //sexec.scheduleWithFixedDelay(offlineMonitorThread, 120, 60, TimeUnit.SECONDS);//GPS设备掉离线
139 sexec.scheduleWithFixedDelay(schedulePstThread, 120, 10, TimeUnit.SECONDS);//班次延迟入库线程 138 sexec.scheduleWithFixedDelay(schedulePstThread, 120, 10, TimeUnit.SECONDS);//班次延迟入库线程
140 sexec.scheduleWithFixedDelay(seiPstThread, 160, 60, TimeUnit.SECONDS);//班次修正日志入库 139 sexec.scheduleWithFixedDelay(seiPstThread, 160, 60, TimeUnit.SECONDS);//班次修正日志入库
141 sexec.scheduleWithFixedDelay(directivesPstThread, 180, 120, TimeUnit.SECONDS);//调度指令延迟入库 140 sexec.scheduleWithFixedDelay(directivesPstThread, 180, 120, TimeUnit.SECONDS);//调度指令延迟入库