[tor-bugs] #19018 [Metrics/CollecTor]: run CollecTor modules without crontab
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Jul 25 08:48:57 UTC 2016
#19018: run CollecTor modules without crontab
-------------------------------+---------------------------------
Reporter: iwakeh | Owner: iwakeh
Type: enhancement | Status: needs_review
Priority: Medium | Milestone: CollecTor 1.0.0
Component: Metrics/CollecTor | Version:
Severity: Normal | Resolution:
Keywords: ctip | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
-------------------------------+---------------------------------
Changes (by iwakeh):
* status: needs_revision => needs_review
Comment:
Please review this
[https://gitweb.torproject.org/user/iwakeh/collector.git/commit/?h=task-19018-scheduler&id=3181179c4749c65b21bc70c9123e463ca265bfc7
branch].
The code has been running fine over the weekend on my mirror.
A longer diff, therefor some explanations:
Fix NPE: apparently empty files named like 'archive/relay-
descriptors/tor/tor-20??-??.tar.xz' are recognized as directories and when
calling listFiles this results in return value null.
This is a bug in both the shell script and CollecTor. The latter is fixed
now and the former ought to be replaced by a java module (see CollecTor's
development page).
Have one 'run' method in
[https://gitweb.torproject.org/user/iwakeh/collector.git/diff/src/main/java/org/torproject/collector/cron/CollecTorMain.java?h=task-19018-scheduler&id=3181179c4749c65b21bc70c9123e463ca265bfc7
CollecTorMain] to unify Exception logging; behavior as before: if a module
fails the scheduler will attempt running it again.
Corrected period calculation and enhanced logging (cf.
[https://gitweb.torproject.org/user/iwakeh/collector.git/tree/src/main/java/org/torproject/collector/cron/Scheduler.java?h=task-19018-scheduler&id=3181179c4749c65b21bc70c9123e463ca265bfc7#n77
here])
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/19018#comment:13>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list