I wonder if uwsgidecorators.postfork() http://uwsgi-docs.readthedocs.org/en/latest/PythonDecorators.html#uwsgidecorators.postfork would do the trick.
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of André Cruz Sent: Friday, December 07, 2012 12:42 PM To: uWSGI developers and users list Subject: [uWSGI] Warmup of Django application Hello. I have uWSGI serving a Django application. Everytime a uwsgi worker starts, it seems the Django app is not loaded on the spot. Instead, when the first request arrives, the application springs into action. The problem is that my application connects to a few services when it starts (Cassandra, Zookeeper, etc), and it seems that the first request(s) fail because of this. I get ImportErrors for things that are there. After a few moments everything starts working correctly. My question is this, is it possible to trigger this initialization work as soon as the worker is started? This way when the first request arrives everything should be ready to go. Thanks! André _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
