> On Jun 5, 2015, at 8:44 AM, dk <[email protected]> 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 online.
> 
> the funny thing my script doesn't work, and I found out that django doesn't 
> like to wait more than 24 secs. =(  I might be doing something wrong?  If I 
> do more than 25 the process just stops at the time.sleep(60) and nothing 
> happen afterwards.  if I do it for 24 secs everything run fine.  

That is a long delay for an http request/response cycle.

If you do not already, you may want to model the remote machine state in a 
Django model. Use that to monitor and update the machine states and then your 
client-facing interactions can be decoupled from it.

You can use a subprocess or celery to do the extended work as required.

hth

- Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/DB6523B8-0EC3-4181-A247-56B9AF1CFFF7%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to