diff options
| author | Aya Morisawa <AyaMorisawa4869@gmail.com> | 2017-01-03 05:18:03 +0900 |
|---|---|---|
| committer | Aya Morisawa <AyaMorisawa4869@gmail.com> | 2017-01-03 05:18:03 +0900 |
| commit | 6f535faa4d4dff46019b3c9cdafbc074a3dd682f (patch) | |
| tree | ea136f3e7e465f8739490e827ff4ff7db73bb004 | |
| parent | :sparkles: (diff) | |
| download | sharkey-6f535faa4d4dff46019b3c9cdafbc074a3dd682f.tar.gz sharkey-6f535faa4d4dff46019b3c9cdafbc074a3dd682f.tar.bz2 sharkey-6f535faa4d4dff46019b3c9cdafbc074a3dd682f.zip | |
:sparkles:
| -rw-r--r-- | src/index.ts | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/index.ts b/src/index.ts index dfd625b9c7..f9d60f00c8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -76,8 +76,7 @@ async function masterMain(): Promise<void> { return; } - // Spawn workers - spawn(() => { + spawnWorkers(() => { Logger.info(chalk.bold.green(`Now listening on port ${config.port}`)); // Listen new workers @@ -168,10 +167,7 @@ async function init(): Promise<InitResult> { return warn ? InitResult.Warn : InitResult.Success; } -/** - * Spawn workers - */ -function spawn(callback: any): void { +function spawnWorkers(callback: any): void { // Count the machine's CPUs const cpuCount = os.cpus().length; |