How to execute a function when uwsgi is stopped

拜拜、爱过 提交于 2019-12-12 04:45:24

问题


i am using flask and uwsgi.. At some point i need to know when uwsgi is stopped or when my app (Flask) object is destroyed and when it happens, execute a function. Any ideas ?? Please


回答1:


you can use the python atexit module or the uwsgi.atexit hook



来源:https://stackoverflow.com/questions/18569056/how-to-execute-a-function-when-uwsgi-is-stopped

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!