Paul Querna wrote:
On Sun, Mar 29, 2009 at 9:17 PM, <[email protected]> wrote:
Author: mturk
Date: Sun Mar 29 19:17:30 2009
New Revision: 759751
URL: http://svn.apache.org/viewvc?rev=759751&view=rev
Log:
Use child singleton watchdog for running the heartbeat module
Modified:
httpd/httpd/trunk/modules/cluster/mod_heartbeat.c
I'm looking at the API exposed by mod_watchdog.h, and its not quite
feeling right.
If we want this to be an API used easily, I think we should just make
them proper timers (ie, run function X in singleton in 10 seconds),
and when the timer finishes, it can re-register -- this is far more
flexiable, and in the long term the API could be taken over by MPMs
that can better support it.
WDYT?
There are actually two API's
The one I implemented for heartbeat is the simple one,
cause the heartbeat functionality is simple.
The second one is where you create a watchdog instance
with some interval and then it calls the provided
callback. If the callback return != 0 it's not
called any more. If you need a different interval,
change it by API call.
IMO having separate watchdogs is much better then
having one that will call multiple callbacks with
different timeouts because if one job blocks, others
will not execute.
BTW, we had this discussion few months back.
Regards
--
^(TM)