Nedved
Nedved

Reputation: 35

How to execute a function when uwsgi is stopped

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

Upvotes: 0

Views: 1187

Answers (1)

roberto
roberto

Reputation: 12933

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

Upvotes: 2

Related Questions