|
List Info
Thread: Length Processing
|
|
| Length Processing |

|
2006-10-25 00:34:43 |
|
I'm migrating a Python
CGI-based web app to CherryPy. One part of the app needs to do
processing that could take several minutes. With CGI, I forked a
separate process and closed the stdin/stdout handles; that was
sufficient to tell Apache to send the completed page to the client, but
still allow my processing to continue.
How can I accomplish the same thing in CherryPy? I could use
subprocess to launch a separate process, but there's a lot of state to
transmit.
--
Tim Roberts, probo.com">timr probo.com
Providenza & Boekelheide, Inc.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To post to this group, send email to cherrypy-users googlegroups.com To unsubscribe from this group, send email to cherrypy-users-unsubscribe googlegroups.com For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users -~----------~----~----~----~------~----~------~--~---
|
| Length Processing |

|
2006-10-25 08:53:57 |
> I'm migrating a Python CGI-based web app to CherryPy.
One part of the
> app needs to do processing that could take several
minutes. With CGI, I
> forked a separate process and closed the stdin/stdout
handles; that was
> sufficient to tell Apache to send the completed page to
the client, but
> still allow my processing to continue.
>
> How can I accomplish the same thing in CherryPy? I
could use subprocess
> to launch a separate process, but there's a lot of
state to transmit.
Maybe start a separate thread instead of a process. Then use
a 202
Accepted in the main thread to inform the client the
processing is
undertaken but not completed.
- Sylvain
>
> --
> Tim Roberts, timr probo.com
> Providenza & Boekelheide, Inc.
>
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at ht
tp://groups-beta.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Length Processing |

|
2006-10-25 17:35:04 |
|
Sylvain Hellegouarch wrote:
mail1.webfaction.com"
type="cite">
I'm migrating a Python CGI-based web app to CherryPy. One part of the
app needs to do processing that could take several minutes. With CGI, I
forked a separate process and closed the stdin/stdout handles; that was
sufficient to tell Apache to send the completed page to the client, but
still allow my processing to continue.
How can I accomplish the same thing in CherryPy? I could use subprocess
to launch a separate process, but there's a lot of state to transmit.
Maybe start a separate thread instead of a process.
Hmmm, is that enough? I can handle that. I'll give it a try. It
didn't work in CGI because the threads shared handles, and Apache uses
the stdin/stdout handles to decide when the page is complete.
mail1.webfaction.com"
type="cite">
Then use a 202 Accepted in the main thread to inform the client the processing is
undertaken but not completed.
The client doesn't have to wait. The situation is that I occasionally
have to send an e-mail to a thousand addresses. The client triggers
the action, but doesn't need a confirmation when complete. I just need
to do the work.
--
Tim Roberts, probo.com">timr probo.com
Providenza & Boekelheide, Inc.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To post to this group, send email to cherrypy-users googlegroups.com To unsubscribe from this group, send email to cherrypy-users-unsubscribe googlegroups.com For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users -~----------~----~----~----~------~----~------~--~---
|
| Length Processing |

|
2006-10-25 17:35:04 |
|
Sylvain Hellegouarch wrote:
mail1.webfaction.com"
type="cite">
I'm migrating a Python CGI-based web app to CherryPy. One part of the
app needs to do processing that could take several minutes. With CGI, I
forked a separate process and closed the stdin/stdout handles; that was
sufficient to tell Apache to send the completed page to the client, but
still allow my processing to continue.
How can I accomplish the same thing in CherryPy? I could use subprocess
to launch a separate process, but there's a lot of state to transmit.
Maybe start a separate thread instead of a process.
Hmmm, is that enough? I can handle that. I'll give it a try. It
didn't work in CGI because the threads shared handles, and Apache uses
the stdin/stdout handles to decide when the page is complete.
mail1.webfaction.com"
type="cite">
Then use a 202 Accepted in the main thread to inform the client the processing is
undertaken but not completed.
The client doesn't have to wait. The situation is that I occasionally
have to send an e-mail to a thousand addresses. The client triggers
the action, but doesn't need a confirmation when complete. I just need
to do the work.
--
Tim Roberts, probo.com">timr probo.com
Providenza & Boekelheide, Inc.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To post to this group, send email to cherrypy-users googlegroups.com To unsubscribe from this group, send email to cherrypy-users-unsubscribe googlegroups.com For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users -~----------~----~----~----~------~----~------~--~---
|
[1-4]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|