List Info

Thread: Forking a new process




Forking a new process
user name
2006-04-25 13:52:13
Well, basically I have processes that could take minutes to
execute,
and I'd like to background them, serve up a page showing
the status,
and then allow users to view the output once they've
completed.

Thanks, Tom


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Forking a new process
user name
2006-04-25 16:22:47
On Tuesday 25 April 2006 06:52, tomass wrote:
> Well, basically I have processes that could take
minutes to
> execute, and I'd like to background them, serve up a
page showing
> the status, and then allow users to view the output
once they've
> completed.
>
> Thanks, Tom

mod_python has/had a method of the request object:
register_cleanup().  
I've used this in the past to start a long runing process:

<http://www.modpython.org/pipermail/mod_py
thon/2004-June/015718.html>

Eric.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Forking a new process
user name
2006-04-25 14:04:30
tomass wrote:
> Well, basically I have processes that could take
minutes to execute,
> and I'd like to background them, serve up a page
showing the status,
> and then allow users to view the output once they've
completed.

Hmm. I don't know what it takes to get a clean independent
fork so that
no files or sockets are shared.

I'm not an expert here ... in absence of better advice, you
could try to
set up a daemon process that only does the background
processing. Your
django process needs to put the batch job into some sort of
queue and
tell the background process that there's work.

The background process would start completely independent of
the django
process, just like any daemon process. It is no problem to
use the
django model and api within the background process if both
are started
independently.

Michael


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Forking a new process
user name
2006-04-25 14:04:30
tomass wrote:
> Well, basically I have processes that could take
minutes to execute,
> and I'd like to background them, serve up a page
showing the status,
> and then allow users to view the output once they've
completed.

Hmm. I don't know what it takes to get a clean independent
fork so that
no files or sockets are shared.

I'm not an expert here ... in absence of better advice, you
could try to
set up a daemon process that only does the background
processing. Your
django process needs to put the batch job into some sort of
queue and
tell the background process that there's work.

The background process would start completely independent of
the django
process, just like any daemon process. It is no problem to
use the
django model and api within the background process if both
are started
independently.

Michael


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Forking a new process
user name
2006-04-25 14:04:30
tomass wrote:
> Well, basically I have processes that could take
minutes to execute,
> and I'd like to background them, serve up a page
showing the status,
> and then allow users to view the output once they've
completed.

Hmm. I don't know what it takes to get a clean independent
fork so that
no files or sockets are shared.

I'm not an expert here ... in absence of better advice, you
could try to
set up a daemon process that only does the background
processing. Your
django process needs to put the batch job into some sort of
queue and
tell the background process that there's work.

The background process would start completely independent of
the django
process, just like any daemon process. It is no problem to
use the
django model and api within the background process if both
are started
independently.

Michael


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Forking a new process
user name
2006-04-25 14:04:30
tomass wrote:
> Well, basically I have processes that could take
minutes to execute,
> and I'd like to background them, serve up a page
showing the status,
> and then allow users to view the output once they've
completed.

Hmm. I don't know what it takes to get a clean independent
fork so that
no files or sockets are shared.

I'm not an expert here ... in absence of better advice, you
could try to
set up a daemon process that only does the background
processing. Your
django process needs to put the batch job into some sort of
queue and
tell the background process that there's work.

The background process would start completely independent of
the django
process, just like any daemon process. It is no problem to
use the
django model and api within the background process if both
are started
independently.

Michael


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Forking a new process
user name
2006-04-25 14:04:30
tomass wrote:
> Well, basically I have processes that could take
minutes to execute,
> and I'd like to background them, serve up a page
showing the status,
> and then allow users to view the output once they've
completed.

Hmm. I don't know what it takes to get a clean independent
fork so that
no files or sockets are shared.

I'm not an expert here ... in absence of better advice, you
could try to
set up a daemon process that only does the background
processing. Your
django process needs to put the batch job into some sort of
queue and
tell the background process that there's work.

The background process would start completely independent of
the django
process, just like any daemon process. It is no problem to
use the
django model and api within the background process if both
are started
independently.

Michael


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

[1-7]

about | contact  Other archives ( Real Estate discussion Medical topics )