On Apr 21, 9:31 am, jazg <tazg2...@gmail.com> wrote:
> In particular, I want to trigger a long process by going to a page, without
> having to wait for the process to finish.
>
> I thought I could do this:
>
> def page(self):
>     def stream():
>         yield "content"
>         long_process()
>     return stream()
>
> But it doesn't exactly work. IE doesn't show "content" until after
> long_process finishes. Firefox shows it, but continues to show "Transferring
> data". I tried
> response.content_type = len("content")
>  but it doesn't seem to have any effect. What else can I do?

Have a read of:

  http://code.google.com/p/modwsgi/wiki/RegisteringCleanupCode

It may be in the mod_wsgi documentation, but that WSGI mechanism of
using close() on returned iterable should would for any WSGI hosting
mechanism.

Graham

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to