durusmail: quixote-users: Re: Long running task.
Long running task.
2005-01-22
Re: Long running task.
2005-01-24
2005-01-24
Fwd: [Quixote-users] Long running task.
2005-01-26
Re: Fwd: [Quixote-users] Long running task.
2005-01-26
2005-01-27
2005-01-27
2005-01-27
Re: Long running task.
Titus Brown
2005-01-24
-> ping ?

Since I seem to be answering Quixote list e-mail today, however badly...  ;)

The usual case is that functions return strings which are passed back to
the browser, and this is what the default Publisher class supports;
e.g. see Publisher.publish in publish.py, Quixote v1.2.

I see no reason why you can't insert something to override this behavior
in specific instances, e.g. in publish() check to see if a _callback
variable is set:

--
# after writing stuff out, but before _clear_request:
if _callback:
   _callback()
--

I'd also define set_callback and get_callback in the module containing
your new publisher class.

This seems like the simplest way to start, and would work fine under
SCGI or other process-based Quixote instances.  For threading you'd
have to attach somethign to each request, though.

cheers,
--titus

reply