Where in flask/gunicorn to initialize application
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using Flask/Gunicorn to run a web application and have a question about the lifecycle management. I have more experience in the Java world with servlets. I'm creating a restful interface to a service. The service is always running on the server and communicates and controls with a set of sub-servers. In Java, my service would be created and initialized (e.g. the setup traditionally found in main() ) through listeners and servlet initialization methods. Where would the equivalent setup and configuration be in Flask? I'm thinking of tasks