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
{{ message }}
Repository navigation
Support runtime hooks for graceful shutdown/restart #1224
Sometimes runtime plugins and composables, allocate (global) resources that need to be gracefully closed when restarting dev server or closing production server.
For this, we shall support a new runtime hook close, and add a hook once for node-server, dev and prerender presets.
Activity
pi0 commentedon May 10, 2023
@trylovetom for implementation, you need to update this files:
We can import global
nitroAppinstance from imports to register the hook then.SIGTERM/SIGINTare good start. Let me know if you need any help.(on next steps, we might also gracefully wait for node requests to drain but later can be improved)
feat: Support runtime hooks for graceful shutdown/restart nitrojs#1224
feat: Support runtime hooks for graceful shutdown/restart nitrojs#1224
feat: Support runtime hooks for graceful shutdown/restart nitrojs#1224
feat: support runtime hooks for graceful shutdown/restart nitrojs#1224