feat(core): Set OS process titles for n8n processes (#39362)

This commit is contained in:
Elias Meire
2026-09-28 07:23:48 +00:00
committed by GitHub
parent 34f77c059b
commit 53dc251508
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -7,6 +7,8 @@ import type { HealthCheckServer } from './health-check-server';
import { JsTaskRunner } from './js-task-runner/js-task-runner';
import { TaskRunnerSentry } from './task-runner-sentry';
process.title = 'n8n task-runner';
// Initialize module paths from NODE_PATH environment variable.
// This is necessary because Node.js doesn't automatically pick up NODE_PATH
// after the process starts. Without this, external npm packages installed
+4
View File
@@ -6,6 +6,10 @@ const path = require('path');
// did get started from another folder that the root one.
process.env.NODE_CONFIG_DIR = process.env.NODE_CONFIG_DIR || path.join(__dirname, 'config');
// Must stay shorter than the original command line.
// See https://nodejs.org/api/process.html#processtitle
process.title = process.argv[2] ? `n8n ${process.argv[2]}` : 'n8n';
// Check if version should be displayed
const versionFlags = ['-v', '-V', '--version'];
if (versionFlags.includes(process.argv.slice(-1)[0])) {