Merge pull request #4127 from omnivore-app/fix/digest-score-initial-load

Refresh data outside of main because flask loads this script in production
This commit is contained in:
Jackson Harper 2024-07-02 13:52:09 +08:00 committed by GitHub
commit 2802e7f94b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -215,6 +215,8 @@ def batch():
app.logger.error(f"exception in batch endpoint: {request.get_json()}\n{e}")
return jsonify({'error': str(e)}), 500
## Run this on startup in both production and development modes
refresh_data()
if __name__ == '__main__':
refresh_data()
app.run(debug=True, port=5000)