views:

64

answers:

1

I have a big form on my site. When the users fill it out and submit it, most of the data just gets dumped to the database, and then they get redirected to a new page. However, I'd also like to use the data to query another site, and then parse the results. That might take a bit longer. It's not essential that the user sees these results right away, so I was wondering if it's possible to asynchronously call a function that will handle this, and then return an HttpResponse from my view like usual without making them wait?

If so... how? Any particular libraries I should look at?

+2  A: 

User RabbitMQ and Celery with django. If you are deployed on EC2, also look at SQS

You create a message from the request-response cycle and an alternative process or a cron keeps checking off the messages.

Lakshman Prasad
Hrm... looks cool. Wonder if I can get this working on WebFaction? I'll have to try in a bit, thanks !!
Mark