Django startup code with wsgi lazy loading
问题 I am running a Django application using Apache+mod_wsgi. When starting up Apache, it seems that the wsgi always lazyloads its app which means that no code is executed when Apache is started. Only when the first request comes in is the whole app loaded, initalized, etc and returned to the user. As I need to run some code without having to rely on the first request, I was wondering if this "lazy loading" can somehow be turned off or workedaround? I tried the WSGIImportScript VirtualHost