django - Run startup code when mod_wsgi autoreload after file changes -
i have mod_wsgi, daemon mode, , django.
i make mod_wsgi run code @ startup if provide application-group
, process-group
params wsgiscriptalias - https://stackoverflow.com/a/20930912/203485 (instead default it'll run on first request).
but how make run same startup code after reloads workers automatically after wsgi file changes (you upload new files , touch
wsgi file)? won't run startup code until first request.
i need heavy initialization after workers start , preferably without server reload (it requires root).
you can call function @ module scope of wsgi script.
Comments
Post a Comment