From 742fa37e2b0830f949900fe62af56aaa634831b9 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Sun, 19 Mar 2023 09:39:33 +0100 Subject: [PATCH] server: show worker mode in process name Changelog: Added --- packages/backend/src/boot/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/boot/index.ts b/packages/backend/src/boot/index.ts index ef98f0eea..46dc2d258 100644 --- a/packages/backend/src/boot/index.ts +++ b/packages/backend/src/boot/index.ts @@ -18,7 +18,13 @@ const ev = new Xev(); * Init process */ export async function boot(): Promise { - process.title = `FoundKey (${cluster.isPrimary ? 'master' : 'worker'})`; + if (envOption.disableClustering) { + process.title = "Foundkey"; + } else if (cluster.isPrimary) { + process.title = "Foundkey (master)"; + } else if (cluster.isWorker) { + process.title = `Foundkey (${process.env.mode})`; + } if (cluster.isPrimary || envOption.disableClustering) { await masterMain();