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

fix: remove deprecated lifecycle and consolidate startup actions #3311

Merged
merged 4 commits into from Mar 14, 2024

Conversation

hay-kot
Copy link
Collaborator

@hay-kot hay-kot commented Mar 14, 2024

What type of PR is this?

(REQUIRED)

  • fix/chore

What this PR does / why we need it:

The original event style startups were deprecated in FastAPI. This removes the old style and adds the new style.

As a bonus it also removes the calling of init_db on it's own and pulls it into the startup logic. I couldn't find a reason not to do this, but it could use another set of eyes to make sure I'm not missing anything here.

Which issue(s) this PR fixes:

N/A - dependency issues. Fixes log errors

Testing

  • Local startup testing
  • Tested via docker:prod command and observed migrations ran and were logged.

Copy link
Collaborator

@michael-genson michael-genson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed with merging init_db into the startup, LGTM

@hay-kot hay-kot enabled auto-merge (squash) March 14, 2024 19:21
@hay-kot hay-kot merged commit 1af0f42 into mealie-next Mar 14, 2024
10 checks passed
@hay-kot hay-kot deleted the fix/fastapi-startup-warning branch March 14, 2024 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants