server: show worker mode in process name

Changelog: Added
This commit is contained in:
Johann150 2023-03-19 09:39:33 +01:00
parent 00332ed37f
commit 742fa37e2b
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -18,7 +18,13 @@ const ev = new Xev();
* Init process
*/
export async function boot(): Promise<void> {
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();