From 3ababf4edb89be0b164d8e9cb1cad5b009de9778 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Mon, 27 Apr 2020 16:50:16 +0300 Subject: Replace the "finish" event with "statistics". --- NEWS | 8 +++++++- doc/wydawca.texi | 23 +++++++++++++++-------- etc/wydawca.conf | 8 ++++---- include/wydawca/wydawca.h | 2 +- modules/logstat/mod_logstat.c | 2 +- modules/mailutils/mod_mailutils.c | 2 +- src/config.c | 3 ++- src/spool.c | 4 ++-- src/timer.c | 2 +- src/wydawca.h | 2 +- 10 files changed, 35 insertions(+), 21 deletions(-) diff --git a/NEWS b/NEWS index 01c8091..ebe721e 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -Wydawca NEWS -- history of user-visible changes. 2020-04-26 +Wydawca NEWS -- history of user-visible changes. 2020-04-27 See the end of file for copying conditions. Please send Wydawca bug reports to . @@ -75,6 +75,12 @@ notification connections. Default is 16. This new statement configures the maximum idle timeout of an upload notification connection. Default is 10 seconds. +** stat-report-interval statement + +** The "statistics" event. + +New event "statistics" replaces the legacy "finish" event. + ** spool timers References to particular spool timers in expansion strings have the diff --git a/doc/wydawca.texi b/doc/wydawca.texi index 7eac388..349d9ba 100644 --- a/doc/wydawca.texi +++ b/doc/wydawca.texi @@ -2543,10 +2543,17 @@ uploader. detailed description. @kwindex finish -@item finish - This event is reported at the end of the wydawca job, when all -spools have been processed. It is normally used to produce final -statistic reports. @xref{statreports}, for an example. +@kwindex statistics +@item statistics + This event produces statistics about the recent jobs performed +by @command{wydawca}. In daemon mode, it is scheduled periodically +as controlled by @code{stat-report-interval} statement. In cron mode +it is emitted when all spools have been processed. + +For compatibility with @command{wydawca} versions prior to 3.1.95, the +event name @samp{finish} can be used instead of @samp{statistics}. + +@xref{statreports}, for an example. See also @ref{mod_logstat}. @end table @end deffn @@ -2794,7 +2801,7 @@ following statement: @smallexample notify-event @{ - event finish; + event statistrics; module mailutils; @} @end smallexample @@ -3201,7 +3208,7 @@ module-init mailutils @{ @} notify-event @{ - event finish; + event statistics; module mailutils; @} @@ -3247,7 +3254,7 @@ The simplest configuration for this module is: module logstat mod_logstat.so; notify-event @{ - event finish; + event statistics; module logstat; @} @end group @@ -3257,7 +3264,7 @@ This will produce on the default logging channel the detailed statistics, as discussed in @ref{statistics}. There is no specific @code{module-init} statements. The module should -be called from @code{notify-event} block on the @samp{finish} event. +be called from @code{notify-event} block on the @samp{statistics} event. The module's @code{module-config} statement can contain the following statements: diff --git a/etc/wydawca.conf b/etc/wydawca.conf index bd87c2b..552dd27 100644 --- a/etc/wydawca.conf +++ b/etc/wydawca.conf @@ -93,10 +93,10 @@ module-init mailutils { mail-statistics { statistics all; message <