-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
How to specify onClose hooks execution order among plugins #1018
Comments
Currently, no. |
Thank you @climba03003 If when wrapping the plugin with |
It works on startup, not on teardown; the feature seems quite interesting, but it will require to creation of a graph of plugins for its dependency mapping. |
Thank you @metcoder95. If this feature can be interesting, what would be the next steps? |
A PR drafting the idea will be very welcomed |
Fastify or avvio? |
I'd suggest |
Ok, maybe first I can file an issue in fastify? I have no idea where to start with the PR |
Oh, good call; I thought we were in |
Closing in favor of fastify/fastify#5375 |
💬 Question here
Is there any way to specify which
onClose
(orpreClose
) hooks from each plugin should be executed before the others? I have some plugins that rely on other main plugins in order to execute correctly theironClose
hooks.E.G.: Some plugins need the database plugin in order to perform some cleaning operations on the database before closing the server. If the database plugin gets torn down before the plugin, the database client results disconnected.
Your Environment
The text was updated successfully, but these errors were encountered: