fix check time
parent
e224d50506
commit
ed7bd22bd7
|
|
@ -91,13 +91,13 @@ public class ThreadManager {
|
|||
scheduledExecutor.scheduleAtFixedRate(new Thread(){
|
||||
public void run () {
|
||||
long lastMilis = System.currentTimeMillis();
|
||||
try { Thread.sleep(10000L); } catch (InterruptedException e) { }
|
||||
try { Thread.sleep(1000L); } catch (InterruptedException e) { }
|
||||
long millis = System.currentTimeMillis();
|
||||
if((millis - lastMilis)-10000>5000||(millis - lastMilis)-10000<-5000){
|
||||
reStart();
|
||||
}
|
||||
}
|
||||
}, delayForMinute, 10, TimeUnit.SECONDS);
|
||||
}, delayForMinute, 1, TimeUnit.SECONDS);
|
||||
scheduledExecutor.execute(new RetrySendIndicationThread("retry_send"));
|
||||
scheduledExecutor.execute(dataReportTask);
|
||||
scheduledExecutor.execute(mongoDataHandlerTask);
|
||||
|
|
|
|||
Loading…
Reference in New Issue