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

Enhancement: Lifespan hook priorities #3597

Open
betaboon opened this issue Jun 25, 2024 · 1 comment
Open

Enhancement: Lifespan hook priorities #3597

betaboon opened this issue Jun 25, 2024 · 1 comment
Labels
3.x This is related to Litestar version 3 Enhancement This is a new feature or request

Comments

@betaboon
Copy link
Contributor

betaboon commented Jun 25, 2024

Summary

I need to run a task after the app has been fully setup.
thus on_startup is to early.

Talking to @cofin on discord revealed the following:

  • Litestar.lifespan seems to be the right location to add this
  • after_startup and before_shutdown should be added to the app/appconfig objects

Basic Example

No response

Drawbacks and Impact

No response

Unresolved questions

No response


Note

While we are open for sponsoring on GitHub Sponsors and
OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.

Check out all issues funded or available for funding on our Polar.sh dashboard

  • If you would like to see an issue prioritized, make a pledge towards it!
  • We receive the pledge once the issue is completed & verified
  • This, along with engagement in the community, helps us know which features are a priority to our users.
Fund with Polar
@betaboon betaboon added the Enhancement This is a new feature or request label Jun 25, 2024
@cofin cofin added the 3.x This is related to Litestar version 3 label Aug 21, 2024
@cofin
Copy link
Member

cofin commented Aug 21, 2024

We should consider renaming this to be Prioritized startup handlers?

@provinzkraut provinzkraut changed the title Enhancement: add after_startup and before_shutdown hooks Enhancement: Lifespan hook priorities Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x This is related to Litestar version 3 Enhancement This is a new feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants