Blocking is the preferred option; in fact, I'm trying to replicate the usual supervisord call, but remove the command-line options in favour of some I will pre-set. I'm also looking to do the same with supervisorctl, so that it connects to the correct supervisord instance.

I've been looking at the source, and will give your suggestion a go. I just wondered if there was a common approach/pattern to starting the server from Python.

Thanks!
Phill

On 20 August 2013 at 17:31:46, Jens Rantil ([email protected]) wrote:

Hi Paul,

I guess you could do

import supervisor.supervisord as supervisord
supervisord.main()


Tried this? Obviously it will block, so you might want to run this in a separate thread if you'd like to other things while having supervisord running.

Cheers,
Jens


On Tue, Aug 20, 2013 at 4:39 PM, Phillip Oldham <[email protected]> wrote:
Hi guys

I'm looking to bundle supervisord in with a number of other scripts (using zc.buildout) to manage their execution, but I'd like users to call my own script which will configure and run supervisord for them (e.g. point to a specific config file, the dir to chdir into, etc). Can anyone point me to any code examples which show how to configure and start supervisord from a Python script?

Thanks,
Phill

_______________________________________________
Supervisor-users mailing list
[email protected]
https://lists.supervisord.org/mailman/listinfo/supervisor-users




--
Want to know how full my inbox is? Or how to get in touch with me faster? Or tell me your e-mail is not that important? Then check this out: http://courteous.ly/4WtfZY
-- 
Phillip Oldham
[email protected]
+44 (0) 7525 01 09 01
_______________________________________________
Supervisor-users mailing list
[email protected]
https://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to