You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to hook into the shutdown sequence of the server so that I can mark my health check route to return failing HTTP codes for some time during the shutdown sequence before the servers stops servicing requests. I tested and it looks like both on_cleanup and on_shutdown calls are fired after the listener is stopped, so I can't use those. It seems like maybe the AppRunner is the construct I need to use, but it will not let me modify state on the app instance from outside before I call AppRunner.cleanup().
Does anyone have a working pattern for something like this?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to hook into the shutdown sequence of the server so that I can mark my health check route to return failing HTTP codes for some time during the shutdown sequence before the servers stops servicing requests. I tested and it looks like both
on_cleanup
andon_shutdown
calls are fired after the listener is stopped, so I can't use those. It seems like maybe theAppRunner
is the construct I need to use, but it will not let me modify state on the app instance from outside before I callAppRunner.cleanup()
.Does anyone have a working pattern for something like this?
Beta Was this translation helpful? Give feedback.
All reactions