Before you reinvent the wheel, do take a look at Celery (
http://celeryproject.org/
). I have been using it for all sorts of background/async processing
tasks ranging from sending emails to Twitter posting.
It was originally created in the Django world but can be easily
integrated with Pyramid, j
On 16 October 2011 21:14, ravi teja wrote:
> Does response callback work for this? Should I use a messaging queue to
> provide the handling to another service?
You *can* use the transaction manager for this – it's possible to
attach a handler that's called after the response has been sent back.
It's better if you run your background tasks on different process. Generally
twisted python or nodejs can make it simple as they treat each and every event
call back as a call for different process. Don't load your server with these
tasks. it always should do its job between the request and resp
Using a messaging queue via celery or zeromq or anything else is the
recommended solution. The response callback is not executed "out-of-band" so
it won't help you here. There's also the option of just using
multiprocessing or something to offload the work if you don't want to setup
another long-ru
Hi,
I would like to do some background processing (like downloading the image,
caching the data etc.) after I send the response for the request.
Which is the recommended way to do it?
Does response callback work for this? Should I use a messaging queue to provide
the handling to another servic