Loading src/main/java/org/torproject/onionoo/server/NodeIndexer.java +18 −12 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ public class NodeIndexer implements ServletContextListener, Runnable { * background thread. */ public synchronized void startIndexing() { if (this.nodeIndexerThread == null) { this.nodeIndexerThread = new Thread(this); this.nodeIndexerThread = new Thread(this, "Onionoo-Node-Indexer"); this.nodeIndexerThread.setDaemon(true); this.nodeIndexerThread.start(); } Loading @@ -103,6 +103,7 @@ public class NodeIndexer implements ServletContextListener, Runnable { @Override public void run() { try { while (this.nodeIndexerThread != null) { this.indexNodeStatuses(); try { Loading @@ -112,6 +113,9 @@ public class NodeIndexer implements ServletContextListener, Runnable { * to index now. */ } } } catch (Throwable th) { // catch all and log log.error("Indexing failed: {}", th.getMessage(), th); } } /** Stop the background process that is periodically reading the node Loading Loading @@ -247,12 +251,14 @@ public class NodeIndexer implements ServletContextListener, Runnable { newRelaysByContact.get(contact).add(fingerprint); newRelaysByContact.get(contact).add(hashedFingerprint); String version = entry.getVersion(); if (null != version) { if (!newRelaysByVersion.containsKey(version)) { newRelaysByVersion.put(version, new HashSet<String>()); } newRelaysByVersion.get(version).add(fingerprint); newRelaysByVersion.get(version).add(hashedFingerprint); } } /* This loop can go away once all Onionoo services had their hourly * updater write effective families to summary documents at least * once. Remove this code after September 8, 2015. */ Loading Loading
src/main/java/org/torproject/onionoo/server/NodeIndexer.java +18 −12 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ public class NodeIndexer implements ServletContextListener, Runnable { * background thread. */ public synchronized void startIndexing() { if (this.nodeIndexerThread == null) { this.nodeIndexerThread = new Thread(this); this.nodeIndexerThread = new Thread(this, "Onionoo-Node-Indexer"); this.nodeIndexerThread.setDaemon(true); this.nodeIndexerThread.start(); } Loading @@ -103,6 +103,7 @@ public class NodeIndexer implements ServletContextListener, Runnable { @Override public void run() { try { while (this.nodeIndexerThread != null) { this.indexNodeStatuses(); try { Loading @@ -112,6 +113,9 @@ public class NodeIndexer implements ServletContextListener, Runnable { * to index now. */ } } } catch (Throwable th) { // catch all and log log.error("Indexing failed: {}", th.getMessage(), th); } } /** Stop the background process that is periodically reading the node Loading Loading @@ -247,12 +251,14 @@ public class NodeIndexer implements ServletContextListener, Runnable { newRelaysByContact.get(contact).add(fingerprint); newRelaysByContact.get(contact).add(hashedFingerprint); String version = entry.getVersion(); if (null != version) { if (!newRelaysByVersion.containsKey(version)) { newRelaysByVersion.put(version, new HashSet<String>()); } newRelaysByVersion.get(version).add(fingerprint); newRelaysByVersion.get(version).add(hashedFingerprint); } } /* This loop can go away once all Onionoo services had their hourly * updater write effective families to summary documents at least * once. Remove this code after September 8, 2015. */ Loading