summaryrefslogtreecommitdiffstats
path: root/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java
diff options
context:
space:
mode:
authorSimon Rettberg2015-07-08 19:40:22 +0200
committerSimon Rettberg2015-07-08 19:40:22 +0200
commitf99ba9714f704ae7bc043eb4ff9ded3f8bf27026 (patch)
tree46004703ccab656860ff4eacb5b41d0ded055285 /dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java
parent[client] Redo package structure, add comments/TODOs, rename GUI classes (diff)
downloadtutor-module-f99ba9714f704ae7bc043eb4ff9ded3f8bf27026.tar.gz
tutor-module-f99ba9714f704ae7bc043eb4ff9ded3f8bf27026.tar.xz
tutor-module-f99ba9714f704ae7bc043eb4ff9ded3f8bf27026.zip
[server] Implement OS list fetching, caching, and fallback to local DB
Diffstat (limited to 'dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java')
-rw-r--r--dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java
index b6e632e6..1484394e 100644
--- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java
+++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java
@@ -5,7 +5,6 @@ import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
-import java.util.TimerTask;
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Logger;
@@ -14,15 +13,17 @@ import org.openslx.bwlp.sat.database.Database;
import org.openslx.bwlp.sat.database.mappers.DbImage;
import org.openslx.bwlp.sat.fileserv.FileServer;
import org.openslx.bwlp.sat.thrift.BinaryListener;
+import org.openslx.bwlp.sat.thrift.cache.OperatingSystemList;
import org.openslx.bwlp.sat.thrift.cache.OrganizationList;
import org.openslx.bwlp.sat.util.Configuration;
import org.openslx.bwlp.sat.util.Json;
import org.openslx.bwlp.sat.util.QuickTimer;
+import org.openslx.bwlp.sat.util.QuickTimer.Task;
import org.openslx.bwlp.thrift.iface.ImageSummaryRead;
import org.openslx.bwlp.thrift.iface.NetDirection;
import org.openslx.bwlp.thrift.iface.NetRule;
import org.openslx.bwlp.thrift.iface.UserInfo;
-
+import org.openslx.thrifthelper.ThriftManager;
public class App {
@@ -51,9 +52,11 @@ public class App {
System.exit(1);
}
+ ThriftManager.setMasterServerAddress("bwlp-masterserver.ruf.uni-freiburg.de");
+
// Load useful things from master server
OrganizationList.get();
- //OperatingSystemList.get();
+ OperatingSystemList.get();
// Start file transfer server
if (!FileServer.instance().start()) {
@@ -75,9 +78,9 @@ public class App {
} catch (SQLException e) {
LOGGER.warn("could not test query getallvisible");
}
- QuickTimer.scheduleAtFixedDelay(new TimerTask() {
+ QuickTimer.scheduleAtFixedDelay(new Task() {
@Override
- public void run() {
+ public void fire() {
Database.printDebug();
}
}, 100, 5000);