Hi. I am using uWSGI + Flask to provide web API. In my web api, it will store some data into database. So I want to keep my database connection in whole Application lifetime. >From docs http://flask.pocoo.org/docs/0.10/tutorial/dbcon/ It suggests create connection in before_request(),and release in after_request(), but as these two functions will called in each request, as my understand, it will connect/close database connection at each request. if so, It is still not keep database connection, I want to keep database connection when uWSGI start, and close database connection when uWSGI stop. Is there any way that can meet my request, and How to?
Thanks~ -- Rejoice,I Desire! _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
