Re: django subprocess doesnt like sleep

2015-06-05 Thread dk
some one put in contab -e ** * * * * systemctl resetart httpd* means that every minute the apache server is restarting and killing everything. that's why non of the script where working =( now that I commented that line from cron tab its working =). -- You received this message b

Re: django subprocess doesnt like sleep

2015-06-05 Thread Tom Lockhart
> On Jun 5, 2015, at 8:44 AM, dk wrote: > > I created a website that can reboot a machine. basically subprocess a script > that lunch the reboot command in Linux. > after that I need to run some other operations. after that I wait 1 minute > before start pinging the machine to see if its back

Re: django subprocess doesnt like sleep

2015-06-05 Thread Vijay Khemlani
I don't think you should be doing that kind of work in the web server process. If you want to run a task that may take a long time to finish then use celery or something like that. On Fri, Jun 5, 2015 at 1:34 PM, dk wrote: > this is what I got from putting > *time.sleep(60)* > *print "s

Re: django subprocess doesnt like sleep

2015-06-05 Thread dk
this is what I got from putting *time.sleep(60)* *print "sleeped for 60secs"* *print 6* directly in the view. and this is what the httpd log gave me. *[Fri Jun 05 11:31:02.034913 2015] [mpm_prefork:notice] [pid 33231] AH00170: caught SIGWINCH, shutting down gracefully[Fri Jun 05 1

django subprocess doesnt like sleep

2015-06-05 Thread dk
I created a website that can reboot a machine. basically subprocess a script that lunch the reboot command in Linux. after that I need to run some other operations. after that I wait 1 minute before start pinging the machine to see if its back online. the funny thing my script doesn't work, and

Django & subprocess

2012-09-15 Thread malinoff
Hi all, please, i need your help. I use suprocess module, executing 'stockfish' uci engine, like: engine = subprocess.Popen('stockfish', stdin=subprocess.PIPE, stdout=subprocess.PIPE) My module use opened subprocess receiving some information from Django's form, for example - move like 'e2e4'