chiark / gitweb /
wip filepoll poll interval variable
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Fri, 30 Apr 2010 22:41:38 +0000 (23:41 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Fri, 30 Apr 2010 22:41:38 +0000 (23:41 +0100)
backends/innduct.c
doc/man/innduct.8

index 427792089e6ca7dab1c96e51941a6cfab9aa00d4..9014309a89b4126fa5277a14e6563c7467cb14ce 100644 (file)
@@ -3,7 +3,6 @@
  *  - inotify not working ?
  *  - some per-conn info thing for control
  *  - option for realsockdir
- *  - option for filepoll
  *  - option for no inotify
  *  - manpage: document control master stuff
  *
@@ -335,6 +334,7 @@ static int max_connections=10;
 static int max_queue_per_conn=200;
 static int target_max_feedfile_size=100000;
 static int period_seconds=60;
+static int filepoll_seconds=5;
 
 static int connection_setup_timeout=200;
 static int inndcomm_flush_timeout=100;
@@ -490,7 +490,7 @@ static InputFile *main_input_file, *flushing_input_file, *backlog_input_file;
 static int sm_period_counter;
 
 /* initialisation to 0 is good */
-static int until_connect, until_backlog_nextscan;
+static int until_connect, until_backlog_nextscan, until_backup_filepoll;
 static double accept_proportion;
 static int nocheck, nocheck_reported;
 
@@ -3112,8 +3112,9 @@ static const Option innduct_options[]= {
 {0,"feedfile-flush-size","BYTES", &target_max_feedfile_size, op_integer     },
 {0,"period-interval",    "TIME",  &period_seconds,           op_seconds     },
 
-{0,"connection-timeout", "TIME",  &connection_setup_timeout, op_seconds     },
-{0,"stuck-flush-timeout","TIME",  &inndcomm_flush_timeout,   op_seconds     },
+{0,"connection-timeout",   "TIME",  &connection_setup_timeout, op_seconds   },
+{0,"stuck-flush-timeout",  "TIME",  &inndcomm_flush_timeout,   op_seconds   },
+{0,"feedfile-poll",        "TIME",  &filepoll_seconds,         op_seconds   },
 
 {0,"no-check-proportion",   "PERCENT",   &nocheck_thresh,       op_double   },
 {0,"no-check-response-time","ARTICLES",  &nocheck_decay,        op_double   },
@@ -3262,7 +3263,7 @@ int main(int argc, char **argv) {
 
   if (!filemon_method_init()) {
     warn("filemon: no file monitoring available, polling");
-    every(5,0,filepoll);
+    every(filepoll_seconds,0,filepoll);
   }
 
   every(period_seconds,1,period);
index 9ff6334fa3d0ecf1320590f774a3c414c968209b..06822cce0d1867c88348d703197d1d2cfc6e54c3 100644 (file)
@@ -156,6 +156,16 @@ How long to wait for innd to respond to a flush request before giving
 up.  The default is
 .BR 100s .
 .TP
+.BI \-\-feedfile-poll= TIME
+How often to poll the feedfile for new articles written by innd
+if file monitoring
+.RI ( inotify
+or equivalent) is not available.  (When file monitoring is available,
+there is no need for periodic checks and we wake immediately up
+whenever the feedfile changes.)
+The default is
+.BR 5s .
+.TP
 .BI \-\-no-check-proportion= PERCENT
 If the moving average of the proportion of articles being accepted
 (rather than declined) by the peer exceeds this value, innduct uses