-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 docs for execution order of listeners #1610
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is incorrect, please respond with an update. Thank you for your contributions. |
This convention comes from Python For instance, if your first before_server_start handler setups a database connection, ones registered after it can rely on that connection being alive both when they are started and stopped, because stopping is done in reverse order, and the database connection is torn down last. Perhaps it should be documented. Pull requests are welcome. Look at docs/sanic/ |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is incorrect, please respond with an update. Thank you for your contributions. |
I noticed an undocumented behavior with listeners, where some of them run in reverse order of registration
Additional context
Relevant lines of code from https://github.com/huge-success/sanic/blob/master/sanic/app.py#L1356
The text was updated successfully, but these errors were encountered: