Skip to content
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

Init beanie is set to recreate_views=False #1189

Open
lmarini opened this issue Aug 27, 2024 · 0 comments
Open

Init beanie is set to recreate_views=False #1189

lmarini opened this issue Aug 27, 2024 · 0 comments
Labels
work around Work around / technical debt

Comments

@lmarini
Copy link
Member

lmarini commented Aug 27, 2024

Right now we initialize beanie and mongodb in main.py. We set recreate_views=False so that beanie doesn't try to recreate the views in every uvicorn worker, throwing an error in the process. This means that if the logic of a view change, we need to manually upgrade the view.

Long term the initialization of beanie and mongodb should happen in a separate script outside of the app.

@lmarini lmarini added the work around Work around / technical debt label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work around Work around / technical debt
Projects
Status: No status
Development

No branches or pull requests

1 participant