|
@@ -32,7 +32,7 @@ public class RefreshThread extends Thread {
|
|
|
try {
|
|
|
this.join();
|
|
|
} catch (InterruptedException e) {
|
|
|
- log.error(e.getMessage(),e);
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -41,7 +41,7 @@ public class RefreshThread extends Thread {
|
|
|
try {
|
|
|
Thread.sleep(1000L);
|
|
|
} catch (InterruptedException e) {
|
|
|
- log.error(e.getMessage(),e);
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
}
|
|
|
|
|
|
if (RepositoryContainer.RepositoryBase.compute_finish) {
|
|
@@ -52,11 +52,12 @@ public class RefreshThread extends Thread {
|
|
|
Date last_refresh_config = null;
|
|
|
Date last_refresh_physical_world = null;
|
|
|
Date last_refresh_zkt_physical_world = null;
|
|
|
+ Date last_refresh_ibms_physical_world = null;
|
|
|
while (!stop) {
|
|
|
try {
|
|
|
Thread.sleep(1000L);
|
|
|
} catch (InterruptedException e) {
|
|
|
- log.error(e.getMessage(),e);
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
}
|
|
|
|
|
|
Date currTime = new Date();
|
|
@@ -82,17 +83,24 @@ public class RefreshThread extends Thread {
|
|
|
}
|
|
|
last_refresh_zkt_physical_world = currTime;
|
|
|
}
|
|
|
- if (changed_config || changed_physical_world || changed_zkt_physical_world) {
|
|
|
+ boolean changed_ibms_physical_world = false;
|
|
|
+ if (last_refresh_ibms_physical_world == null || currTime.getTime() - last_refresh_ibms_physical_world.getTime() > 1000L * 60 * 60) {
|
|
|
+ if (Constant.ibms_physical_world_enable && Constant.ibms_physical_world_refresh_enable) {
|
|
|
+ changed_ibms_physical_world = RWDDownloadUtil.Process_ibms_physical_world();
|
|
|
+ }
|
|
|
+ last_refresh_ibms_physical_world = currTime;
|
|
|
+ }
|
|
|
+ if (changed_config || changed_physical_world || changed_zkt_physical_world || changed_ibms_physical_world) {
|
|
|
log.warn("recompute begin");
|
|
|
RepositoryImpl Repository = new RepositoryImpl();
|
|
|
Repository.use_thread = !Constant.debug;
|
|
|
Repository.RepositoryBase = RepositoryContainer.RepositoryBase;
|
|
|
- RWDRepositoryUtil.DoRepository(Repository, changed_physical_world || changed_zkt_physical_world);
|
|
|
+ RWDRepositoryUtil.DoRepository(Repository, changed_physical_world || changed_zkt_physical_world || changed_ibms_physical_world);
|
|
|
RepositoryContainer.instance = Repository;
|
|
|
log.warn("recompute finish");
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
- log.error(e.getMessage(),e);
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
}
|
|
|
}
|
|
|
}
|