-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🧹 Initialize database on app start-up #5630
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork). |
Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork). |
Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork). |
QA is down because of a recent PR we merged today: #5630 This PR failed to take into account that Heroku uses the function `post_fork` in `gunicorn.conf.py` and not the `if __name__ == '__main__'` located in `app.py` **How to test** Everything should work, but the real test is on Alpha.
Moves the database initialization to the constructor of the Database object, and then calling it on
__main__
, this way we have a bit more control in the order of execution of these steps.Fixes #5609
How to test
All tests should pass, and the database type checker should work as well.