问题
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