[tor-commits] [collector/master] Add change log entry and tweaks for shutdown hook.
karsten at torproject.org
karsten at torproject.org
Tue Sep 6 18:44:15 UTC 2016
commit 261f2c06107bfe4e1a860f9d19fb23ace5c41a5e
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Tue Sep 6 20:41:32 2016 +0200
Add change log entry and tweaks for shutdown hook.
---
CHANGELOG.md | 4 +++-
src/main/java/org/torproject/collector/cron/Scheduler.java | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cf1ea12..81aa94e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,7 +1,9 @@
-# Changes in version 1.1.0 - 2016-08-31
+# Changes in version 1.1.0 - 2016-09-xx
* Medium changes
- Add support for Bifroest's bridge descriptor tarballs.
+ - Use a shutdown hook that gives currently running modules up to 10
+ minutes to finish properly, rather than killing them immediately.
* Minor changes
- Remove quotes around base URL in index.json.
diff --git a/src/main/java/org/torproject/collector/cron/Scheduler.java b/src/main/java/org/torproject/collector/cron/Scheduler.java
index 1863d73..aa86cad 100644
--- a/src/main/java/org/torproject/collector/cron/Scheduler.java
+++ b/src/main/java/org/torproject/collector/cron/Scheduler.java
@@ -36,7 +36,7 @@ public final class Scheduler implements ThreadFactory {
private final ThreadFactory threads = Executors.defaultThreadFactory();
private int currentThreadNo = 0;
- private long gracePeriodMinutes = 20L;
+ private long gracePeriodMinutes = 10L;
private final ScheduledExecutorService scheduler =
Executors.newScheduledThreadPool(10, this);
@@ -59,7 +59,7 @@ public final class Scheduler implements ThreadFactory {
gracePeriodMinutes = conf.getLong(Key.ShutdownGraceWaitMinutes);
} catch (ConfigurationException ce) {
logger.warn("Cannot read grace period: {}", ce);
- gracePeriodMinutes = 20L;
+ gracePeriodMinutes = 10L;
}
List<Callable<Object>> runOnceMains = new ArrayList<>();
for (Map.Entry<Key, Class<? extends CollecTorMain>> ctmEntry
More information about the tor-commits
mailing list