From: Ian Jackson Date: Fri, 30 Apr 2010 22:41:38 +0000 (+0100) Subject: wip filepoll poll interval variable X-Git-Tag: innduct-0.1~89 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=innduct.git;a=commitdiff_plain;h=015f3bd758797652cfb0086dbf741b490ef18de6 wip filepoll poll interval variable --- diff --git a/backends/innduct.c b/backends/innduct.c index 4277920..9014309 100644 --- a/backends/innduct.c +++ b/backends/innduct.c @@ -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); diff --git a/doc/man/innduct.8 b/doc/man/innduct.8 index 9ff6334..06822cc 100644 --- a/doc/man/innduct.8 +++ b/doc/man/innduct.8 @@ -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