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: add after_startup and before_shutdown hooks #3597

Open
betaboon opened this issue Jun 25, 2024 · 0 comments · May be fixed by #3598
Open

Enhancement: add after_startup and before_shutdown hooks #3597

betaboon opened this issue Jun 25, 2024 · 0 comments · May be fixed by #3598
Labels
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement This is a new feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant