summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2002-07-02 17:17:56 +0000
committerPeter Palfrader <peter@palfrader.org>2002-07-02 17:17:56 +0000
commitc76c2795ec98b57867901525c17afb39e452b8a1 (patch)
tree982f77c4e7bbb0533925defea624c129cc6421c8
parentc4413aa05880d2b35015aaca07a445bf88c59ae1 (diff)
Make all times configurable
-rw-r--r--Echolot/Config.pm19
-rwxr-xr-xpingd18
2 files changed, 22 insertions, 15 deletions
diff --git a/Echolot/Config.pm b/Echolot/Config.pm
index cfa8658..f2ff976 100644
--- a/Echolot/Config.pm
+++ b/Echolot/Config.pm
@@ -1,7 +1,7 @@
package Echolot::Config;
# (c) 2002 Peter Palfrader <peter@palfrader.org>
-# $Id: Config.pm,v 1.7 2002/07/02 17:13:11 weasel Exp $
+# $Id: Config.pm,v 1.8 2002/07/02 17:17:56 weasel Exp $
#
=pod
@@ -37,8 +37,15 @@ sub init($) {
fetch_new => 1,
ping_new => 1,
show_new => 1,
- pinger_interval => 300,
- ping_every_nth_time => 48,
+
+ processmail => 60, # process incomng mail every minute
+ pinger_interval => 5*60, # send out pings every 5 minutes
+ ping_every_nth_time => 48, # send out pings to the same remailer every 48 calls, i.e. every 4 hours
+ buildstats => 5*60, # build statistics every 5 minutes
+ commitprospectives => 8*60*60, # commit prospective addresses every 8 hours
+ expire => 24*60*60, # daily
+ getkeyconf => 24*60*60, # daily
+
resultdir => 'results',
gnupghome => 'gnupg',
tmpdir => 'tmp',
@@ -46,9 +53,9 @@ sub init($) {
reliable_auto_add_min => 3, # 3 remailes need to list new address
commands_file => 'commands.txt',
pidfile => 'pingd.pid',
- expire_keys => 432000, # 5 days
- expire_confs => 432000, # 5 days
- expire_pings => 1123200, # 12 days
+ expire_keys => 5*24*60*60, # 5 days
+ expire_confs => 5*24*60*60, # 5 days
+ expire_pings => 12*24*60*60, # 12 days
storage => {
backend => 'File',
File => {
diff --git a/pingd b/pingd
index f027e39..4901063 100755
--- a/pingd
+++ b/pingd
@@ -1,7 +1,7 @@
#!/usr/bin/perl -wT
# (c) 2002 Peter Palfrader <peter@palfrader.org>
-# $Id: pingd,v 1.10 2002/07/02 17:12:45 weasel Exp $
+# $Id: pingd,v 1.11 2002/07/02 17:17:56 weasel Exp $
#
=pod
@@ -236,16 +236,16 @@ if ($COMMAND eq 'add') {
setSigHandlers();
$scheduler = new Echolot::Scheduler;
- $scheduler->add('exit' , -1 , 0, 'exit' );
- $scheduler->add('readcommands' , -1 , 0, \&Echolot::Commands::processCommands );
+ $scheduler->add('exit' , -1 , 0, 'exit' );
+ $scheduler->add('readcommands' , -1 , 0, \&Echolot::Commands::processCommands );
- $scheduler->add('processmail' , 60 , 0, \&Echolot::Mailin::process );
- $scheduler->add('ping' , Echolot::Config::get()->{'pinger_interval'} , 0, \&Echolot::Pinger::send_pings );
- $scheduler->add('buildstats' , 60 , 0, \&Echolot::Stats::build );
+ $scheduler->add('processmail' , Echolot::Config::get()->{'processmail'} , 0, \&Echolot::Mailin::process );
+ $scheduler->add('ping' , Echolot::Config::get()->{'pinger_interval'} , 0, \&Echolot::Pinger::send_pings );
+ $scheduler->add('buildstats' , Echolot::Config::get()->{'buildstats'} , 0, \&Echolot::Stats::build );
- $scheduler->add('commitprospectives' , 30*60 , 0, \&commit_prospective_address );
- $scheduler->add('expire' , 15*60 , 0, \&expire );
- $scheduler->add('getkeyconf' , 24*60*60 , 0, \&Echolot::Conf::send_requests );
+ $scheduler->add('commitprospectives' , Echolot::Config::get()->{'commitprospectives'} , 0, \&commit_prospective_address );
+ $scheduler->add('expire' , Echolot::Config::get()->{'expire'} , 0, \&expire );
+ $scheduler->add('getkeyconf' , Echolot::Config::get()->{'getkeyconf'} , 0, \&Echolot::Conf::send_requests );
$scheduler->run();