mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 05:17:28 -08:00
fix(core): Fix new graceful shutdown env being always overridden by deprecated env (#8503)
This commit is contained in:
parent
88cf1823d3
commit
cc41fc7c80
|
@ -44,7 +44,7 @@ export abstract class BaseCommand extends Command {
|
||||||
/**
|
/**
|
||||||
* How long to wait for graceful shutdown before force killing the process.
|
* How long to wait for graceful shutdown before force killing the process.
|
||||||
*/
|
*/
|
||||||
protected gracefulShutdownTimeoutInS: number = config.getEnv('generic.gracefulShutdownTimeout');
|
protected gracefulShutdownTimeoutInS = config.getEnv('generic.gracefulShutdownTimeout');
|
||||||
|
|
||||||
async init(): Promise<void> {
|
async init(): Promise<void> {
|
||||||
await initErrorHandling();
|
await initErrorHandling();
|
||||||
|
|
|
@ -267,9 +267,10 @@ export class Worker extends BaseCommand {
|
||||||
}
|
}
|
||||||
|
|
||||||
async init() {
|
async init() {
|
||||||
const configuredShutdownTimeout = config.getEnv('queue.bull.gracefulShutdownTimeout');
|
const { QUEUE_WORKER_TIMEOUT } = process.env;
|
||||||
if (configuredShutdownTimeout) {
|
if (QUEUE_WORKER_TIMEOUT) {
|
||||||
this.gracefulShutdownTimeoutInS = configuredShutdownTimeout;
|
this.gracefulShutdownTimeoutInS =
|
||||||
|
parseInt(QUEUE_WORKER_TIMEOUT, 10) || config.default('queue.bull.gracefulShutdownTimeout');
|
||||||
this.logger.warn(
|
this.logger.warn(
|
||||||
'QUEUE_WORKER_TIMEOUT has been deprecated. Rename it to N8N_GRACEFUL_SHUTDOWN_TIMEOUT.',
|
'QUEUE_WORKER_TIMEOUT has been deprecated. Rename it to N8N_GRACEFUL_SHUTDOWN_TIMEOUT.',
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue