I have a Flask app (Plotly Dash) that fetches data from a DB which gets updated every day. Deployed on AWS, I run the app with gunicorn/nginx. Problem is, the data used in the app are from the latest gunicorn run, not the latest in the DB.
A solution I thought is adding an attribute to gunicorn command (eg. --reload) with a timer, to auto-restart gunicorn daily. Is this possible, or even, are there any other workarounds?
SOLUTION : https://community.plot.ly/t/how-to-refresh-data-on-fly/13069