Signal Handler for Flask application with Gunicorn + Eventlet

380 Views Asked by At

Currently, I am trying to add a signal handler that correctly updates the database state whenever our server is re-started/updated by listening for SIGTERM interrupts. Our Flask app is on a Gunicorn server monkey-patched with eventlet.

However, whenever the restart happens, we get the error from eventlet 'do not call blocking functions from the mainloop'. How do we get around this issue?

Thank you!

enter image description here enter image description here

0

There are 0 best solutions below