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

Add on_start and on_shutdown lifespan hooks #58

Closed
4 tasks done
cirospaciari opened this issue Jan 3, 2023 · 0 comments
Closed
4 tasks done

Add on_start and on_shutdown lifespan hooks #58

cirospaciari opened this issue Jan 3, 2023 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@cirospaciari
Copy link
Owner

cirospaciari commented Jan 3, 2023

on start and on shutdown hooks with async and sync support is very useful when using CLI tools to do start and cleanup things.

from socketify import App

app = App()

@app.on_start
def on_start():
    pass

@app.on_shutdown
def on_shutdown():
    pass
  • Add start hook
  • Add shutdown hook
  • Add CLI support
  • Add Documentation
@cirospaciari cirospaciari added documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers and removed good first issue Good for newcomers labels Jan 3, 2023
@cirospaciari cirospaciari changed the title Add on_start and on_shutdown hooks Add on_start and on_shutdown lifespan hooks Jan 3, 2023
@cirospaciari cirospaciari self-assigned this Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant