v0.0.5 Lifespan / Lifecycle events #77
cirospaciari
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What is changed in socketify:
res.send
andres.cork_send
Lifespan / Lifecycle events
Now you can use socketify start and shutdown events to create/clean thread pools, connections pools, etc when the application starts or shutdown itself.
If any exception occurs in the start event the application will continue and start normally,
if you want to fail a start you need to catch the exception and use
sys.exit(1)
to shut down prematurely.Both
app.on_start
andapp.on_shutdown
can be sync or async.Work in progress for v0.1.0:
This discussion was created from the release v0.0.5 Lifespan / Lifecycle events.
Beta Was this translation helpful? Give feedback.
All reactions