Hi,
thank you for your reply.
I think the same, now priorities are quite useless, or better are only 
useful to choose which program start first in terms of milliseconds.
For my problem (and maybe for others) I think that cuold be useful to 
add a parameter in the [program:x] section, something like 
"autostartaftersec" used to sleep X seconds before starting program when 
autostart in true. It's simple to implement.This parameter cuold be 
useful for autostart scheduling of the processes.

With this solution remains the problem to sleep when the process are 
grouped and must started/restarted in a particular sequence with a 
sleep, in this case a solution could be add a parameter to [group:x] 
section with something like this:

startafetersec=progam,seconds

What do you think?

Anyway thank you for this product it's really useful, I'm porting all my 
"startup script" to supervisor.


Davide

On 26/08/10 18.56, Chris McDonough wrote:
> Hi Davide,
>
> Unfortunately supervisor priorities aren't very sophisticated.  In
> particular, they don't imply that processes with lower priorities wait
> for a process with a higher priority to start.  In reality, they are
> somewhat useless, unfortunately.  It's a notional idea to add better
> process startup dependency support to supervisor, but we have no
> concrete schedule.
>
> - C
>
> On Thu, 2010-08-26 at 18:51 +0200, Davide Marrone wrote:
>> Hi,
>> I have a question about priority, when I read the manual I saw:
>>
>>> Process Groups
>>>
>>>      Processes often need to be started and stopped in groups, sometimes 
>>> even in a “priority order”. It’s often difficult to explain to people how 
>>> to do this. Supervisor allows you to assign priorities to processes, and 
>>> allows user to emit commands via the supervisorctl client like “start all”, 
>>> and “restart all”, which starts them in the preassigned priority order. 
>>> Additionally, processes can be grouped into “process groups” and a set of 
>>> logically related processes can be stopped and started as a unit.
>>
>> that is great I have some deamons that run and in some case one process
>> must be "fully running" before the other can start. The problem is that
>> i saw that all process start immediatly when supervisor starts
>> example
>>
>> 2010-08-26 18:34:10,937 INFO spawned: 'proc1' with pid 13596 (pri:100)
>> 2010-08-26 18:34:10,976 INFO spawned: 'proc2' with pid 13598 (pri:200)
>> 2010-08-26 18:34:10,998 INFO spawned: 'proc3' with pid 13600 (pri:200)
>> 2010-08-26 18:34:11,010 INFO spawned: 'proc4' with pid 13602 (pri:200)
>> 2010-08-26 18:34:11,016 INFO spawned: 'proc5' with pid 13603 (pri:999)
>> 2010-08-26 18:34:11,175 INFO spawned: 'proc6' with pid 13604 (pri:999)
>> 2010-08-26 18:34:11,195 INFO spawned: 'proc7' with pid 13614 (pri:999)
>> 2010-08-26 18:34:11,207 INFO spawned: 'proc8' with pid 13616 (pri:999)
>> 2010-08-26 18:34:11,214 INFO spawned: 'proc9' with pid 13617 (pri:999)
>>
>> the problem is that I need that proc5 is started only when proc1 is
>> "fully started" (after startsecs are passed)
>>
>> is possibile to do that? or I need to set autostart=false to all and
>> then make a script that does something like:
>>
>> supervisorctl start proc1
>> supervisorctl start proc2
>> sleep 10
>> supervisorctl start proc3
>> ...
>>
>> best
>> Davide
>> _______________________________________________
>> Supervisor-users mailing list
>> [email protected]
>> http://lists.supervisord.org/mailman/listinfo/supervisor-users
>>
>
>
>

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

Reply via email to