uhm..... why not having them started with systemd or upstart or supervisord 
?

Scheduler is "by design" allowed to run with multiple instances (to process 
a longer queue you may want to start more of them), but if you're really 
loosing money why didn't you rely on that services to be sure that there's 
only one instance running?
There are a looooot of nice implementations out there and the one I 
mentioned are pretty much "state-of-the-art" :D (while contributing to fix 
current issues)

BTW: - "responding to ctrl+c" fixed in trunk recently 
           - "os messed up maybe" require you to check the os, python 
programs can't be omniscient :D
           - "messy developers", no easy fix for that too 


On Wednesday, June 27, 2012 9:18:06 PM UTC+2, Michael Toomim wrote:
>
> The problem with terminating the processes is:
>   • sometimes they don't respond to control-c, and need a kill -9
>   • or sometimes that doesn't work, maybe the os is messed up
>   • or sometimes the developer might run two instances simultaneously, 
> forgetting that one was already running
>
> You're right that usually I can shut them both down with control-c, but I 
> need a safeguard. My application spends money on mechanical turk and I'll 
> spend erroneous money and upset my users if it goes wrong by accident.
>
> On Wednesday, June 27, 2012 12:56:52 AM UTC-7, Niphlod wrote:
>>
>> BTW: I'm pretty sure that when you say "scheduler should be terminated 
>> alongside web2py" you're not perfectly grasping how webdevelopment in 
>> production works. If you're using "standalone" versions, i.e. not mounted 
>> on a webserver, you can start your instances as web2py -a mypassword & 
>> web2py -K myapp and I'm pretty sure when hitting ctrl+c both will shutdown. 
>>
>

Reply via email to