On Wed, Nov 23, 2011 at 12:47 PM, Martin Hamant <[email protected]> wrote:
> output = out(on_disconnect={ delay := (-1.) }, on_connect={ delay := (5.) }

This isn't effective for on_connect, as you said. You need to do the
first call to add_timeout yourself after having setup the delay. Then
it calls itself again, until you set a negative delay.

If you start the polling on first connection, and stop if in on_stop,
then you should be fine. (By the way, this makes it useless to stop it
after source.shutdown, since the shutdown triggers on_stop.)

> So I've think to put add_timeout() call directly in on_connect definition
> but it's not possible as update_meta() can't be defined before output
> source.

Ah... that problem again. You need to use a stub function (a reference
to a fake update_meta, which you set to the correct one once it's
defined) and we need to add recursion quickly :)

Cheers,
-- 
David

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to