Hi there.

I'd like to run background application.

I coded this code.

I wrote the urls.py and I added in the view.

def run_junix(request):
    cmd = "cd app_path;nohup python background_app.py &"
    import subprocess
    proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, 
stderr=subprocess.STDOUT)

    return HttpResponse("bg test")

Is it good way? or using supervisor or, if you know the better way, would 
you tell me?

Anyone who know this matter, please help.

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
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/0a8222ff-a22c-44a5-a098-2b663aaca294%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to