forked from FoundKeyGang/FoundKey
server: show worker mode in process name
Changelog: Added
This commit is contained in:
parent
00332ed37f
commit
742fa37e2b
1 changed files with 7 additions and 1 deletions
|
@ -18,7 +18,13 @@ const ev = new Xev();
|
||||||
* Init process
|
* Init process
|
||||||
*/
|
*/
|
||||||
export async function boot(): Promise<void> {
|
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) {
|
if (cluster.isPrimary || envOption.disableClustering) {
|
||||||
await masterMain();
|
await masterMain();
|
||||||
|
|
Loading…
Reference in a new issue