question about connection pool, task queue in WSGI
est <[email protected]> Fri, 13 Jul 2012 10:50:01 +0800
| Newsgroups | gmane.comp.python.web |
|---|---|
| Message-ID | <CA+=kK2+6bE0QxQ-Twxs11gxT72yEh5zThVMturjrnbNdSx2M8g@mail.gmail.com> |
Hi list, I am running a site with django + uwsgi, I have few questions about how WSGI works. 1. Is db connection open/close handled by Django? If it's open/closed per request, can we make a connection pool in wsgi level, then multiple django views can share it? 2. As a general design consideration, can we execute some task *after* the response has returned to client? I have some heavy data processing need to be done after return HttpResponse() in django, the standard way to do this seems like Celery or other task queue with a broker. It's just too heavyweight. Is it possible to do some simple background task in WSGI directly? Thanks in advance! _______________________________________________ Web-SIG mailing list [email protected] Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/gcpw-web-sig%40m.gmane.org