commit 8ed8de6e76e0f45f6112f3d60597037bdf27493f Author: Karsten Loesing karsten.loesing@gmx.net Date: Thu Sep 19 14:57:15 2019 +0200
Fix bridge pool assignments sync and log statement. --- CHANGELOG.md | 2 ++ .../collector/bridgepools/BridgePoolAssignmentsProcessor.java | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md index d6992c9..48eae33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ * Minor changes - Update create-tarballs.sh to also produce bridge pool assignments tarballs. + - Fix synchronization part of newly re-added bridge pool + assignments module.
# Changes in version 1.11.0 - 2019-09-19 diff --git a/src/main/java/org/torproject/metrics/collector/bridgepools/BridgePoolAssignmentsProcessor.java b/src/main/java/org/torproject/metrics/collector/bridgepools/BridgePoolAssignmentsProcessor.java index a386fb6..875273d 100644 --- a/src/main/java/org/torproject/metrics/collector/bridgepools/BridgePoolAssignmentsProcessor.java +++ b/src/main/java/org/torproject/metrics/collector/bridgepools/BridgePoolAssignmentsProcessor.java @@ -3,6 +3,7 @@
package org.torproject.metrics.collector.bridgepools;
+import org.torproject.descriptor.BridgePoolAssignment; import org.torproject.metrics.collector.conf.Configuration; import org.torproject.metrics.collector.conf.ConfigurationException; import org.torproject.metrics.collector.conf.Key; @@ -79,6 +80,8 @@ public class BridgePoolAssignmentsProcessor extends CollecTorMain { */ public BridgePoolAssignmentsProcessor(Configuration config) { super(config); + this.mapPathDescriptors.put("recent/bridge-pool-assignments", + BridgePoolAssignment.class); }
/** @@ -153,7 +156,7 @@ public class BridgePoolAssignmentsProcessor extends CollecTorMain { } } if (null != latestPublished - && latestPublished.minusMinutes(330L).isBefore(LocalDateTime.now())) { + && latestPublished.plusMinutes(330L).isBefore(LocalDateTime.now())) { logger.warn("The last known bridge pool assignment list was " + "published at {}, which is more than 5:30 hours in the past.", latestPublished);