Lennart Regebro wrote:
> When starting my zeo-clients I don't want them to all connect at the
> same time, but stagger it. I found a buildout with a sleep script that
> does this, but it fails when killing the processes during shutdown.
> (http://rpatterson.net/blog/stagger-supervisord)
> 
> Is there another way of doing this? :-)

I think it would be nice for us to come up with a little dependency system 
like what's being discussed.  I would like to suggest an alternative that may 
help you in the meantime.

You can set all of your subprocesses to autostart=False, and then create your 
bootstrap subprocess with a small Python script of your own.  You can set 
autostart=True on that one.

There is a module included with Supervisor called supervisor.childutils that 
provides a very convenient way for processes running under Supervisor to get 
an xmlrpclib.ServerProxy to Supervisor.

In your bootstrap script, you can use our XML-RPC interface to start your 
subprocesses.  The methods for starting and stopping subprocesses have a 
"wait" parameter that controls whether Supervisor will block the XML-RPC 
client until the operation has finished or not.  You can control the startup 
as you like in not many lines of Python.

Regards,
Mike

-- 
Mike Naberezny
Maintainable Software
http://maintainable.com
_______________________________________________
Supervisor-users mailing list
[email protected]
http://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to