feat(core): Add N8N_GRACEFUL_SHUTDOWN_TIMEOUT env var (#8068)

Add generic N8N_GRACEFUL_SHUTDOWN_TIMEOUT which controls how long n8n
process will wait for graceful exit before exitting forcefully. This
variables replaces the QUEUE_WORKER_TIMEOUT variable that was used for
worker process.

DEPRECATED: QUEUE_WORKER_TIMEOUT deprected

QUEUE_WORKER_TIMEOUT environment variable has been replaced with
N8N_GRACEFUL_SHUTDOWN_TIMEOUT.
This commit is contained in:
Tomi Turtiainen
2023-12-18 14:04:19 +02:00
committed by GitHub
parent 0590ac7826
commit 614f488386
3 changed files with 16 additions and 4 deletions

View File

@@ -439,7 +439,7 @@ export const schema = {
env: 'QUEUE_RECOVERY_INTERVAL',
},
gracefulShutdownTimeout: {
doc: 'How long should n8n wait for running executions before exiting worker process (seconds)',
doc: '[DEPRECATED] (Use N8N_GRACEFUL_SHUTDOWN_TIMEOUT instead) How long should n8n wait for running executions before exiting worker process (seconds)',
format: Number,
default: 30,
env: 'QUEUE_WORKER_TIMEOUT',
@@ -497,6 +497,13 @@ export const schema = {
default: 'dev',
env: 'N8N_RELEASE_TYPE',
},
gracefulShutdownTimeout: {
doc: 'How long should n8n process wait for components to shut down before exiting the process (seconds)',
format: Number,
default: 30,
env: 'N8N_GRACEFUL_SHUTDOWN_TIMEOUT',
},
},
// How n8n can be reached (Editor & REST-API)