We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
SERVER_SHUTDOWN_TIMEOUT
SERVER_FORCE_SHUTDOWN_TIMEOUT
1 parent 51dbad2 commit 00454dbCopy full SHA for 00454db
src/_plugins.ts
@@ -26,9 +26,13 @@ export const gracefulShutdownPlugin: ServerPlugin = (server) => {
26
return;
27
}
28
const gracefulShutdown =
29
- config === true || !config?.gracefulTimeout ? 3 : config.gracefulTimeout;
+ config === true || !config?.gracefulTimeout
30
+ ? Number.parseInt(process.env.SERVER_SHUTDOWN_TIMEOUT || "") || 3
31
+ : config.gracefulTimeout;
32
const forceShutdown =
- config === true || !config?.forceTimeout ? 3 : config.forceTimeout;
33
+ config === true || !config?.forceTimeout
34
+ ? Number.parseInt(process.env.SERVER_FORCE_SHUTDOWN_TIMEOUT || "") || 5
35
+ : config.forceTimeout;
36
let isShuttingDown = false;
37
const shutdown = async () => {
38
if (isShuttingDown) return;
0 commit comments