Re: run external script from view

2008-02-22 Thread sector119

I just want run simple external script and don't want to run any
daemon for it :) I know about django-queue-service.

when I use django.utils.daemonize.become_daemon at script.py and
spawnl('script.py') in view I can run script.py in another process and
send some HttpResponse, but browser still wait for data, why!?

become_daemon - dup stderr, stdin, stdout to /dev/null, or I can close
them, but no effect, browser still wait...

cbmeeks написав:
> How about having the view store an entry in something like Amazon's
> SQS.  Then, a daemon would monitor SQS for "script jobs" and then run
> them.  That would give you a good asynchronise (spelling?) system.
>
> cbmeeks
> http://codershangout.com
>
>
> On Feb 22, 5:23 am, sector119 <[EMAIL PROTECTED]> wrote:
> > Hi ALL!
> >
> > How to run some python script from view and not wait and of work of
> > this script, and execute some view code after script call in this
> > view?
> > This python script use django.utils.daemonize.become_daemon to become
> > a daemon.
> > When I run this script from view at _development_ server using
> > os.execlv('/path/to/daemon.py'), development server finished hos work
> > and nothing is executing after os.execlv call.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: run external script from view

2008-02-22 Thread cbmeeks

How about having the view store an entry in something like Amazon's
SQS.  Then, a daemon would monitor SQS for "script jobs" and then run
them.  That would give you a good asynchronise (spelling?) system.

cbmeeks
http://codershangout.com


On Feb 22, 5:23 am, sector119 <[EMAIL PROTECTED]> wrote:
> Hi ALL!
>
> How to run some python script from view and not wait and of work of
> this script, and execute some view code after script call in this
> view?
> This python script use django.utils.daemonize.become_daemon to become
> a daemon.
> When I run this script from view at _development_ server using
> os.execlv('/path/to/daemon.py'), development server finished hos work
> and nothing is executing after os.execlv call.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



run external script from view

2008-02-22 Thread sector119

Hi ALL!

How to run some python script from view and not wait and of work of
this script, and execute some view code after script call in this
view?
This python script use django.utils.daemonize.become_daemon to become
a daemon.
When I run this script from view at _development_ server using
os.execlv('/path/to/daemon.py'), development server finished hos work
and nothing is executing after os.execlv call.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---