summary refs log tree commit diff
path: root/bundle/src/start.ts
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-07-07 23:34:43 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-07-07 23:34:43 +1000
commite1ebfe79d21930592a7cf937f58a147ddde2b01b (patch)
treeba4a7f3e4b1b8f697694e11bbd7cab460337d53e /bundle/src/start.ts
parentEnsure password was given if email is given in PATCH @me (diff)
parentFormat changed files (diff)
downloadserver-e1ebfe79d21930592a7cf937f58a147ddde2b01b.tar.xz
Merge branch 'master' into fix/claim_accounts
Diffstat (limited to 'bundle/src/start.ts')
-rw-r--r--bundle/src/start.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/bundle/src/start.ts b/bundle/src/start.ts

index 7660b296..de3b5848 100644 --- a/bundle/src/start.ts +++ b/bundle/src/start.ts
@@ -9,7 +9,12 @@ config(); import { execSync } from "child_process"; // TODO: add socket event transmission -let cores = Number(process.env.THREADS) || os.cpus().length; +var cores = 1; +try { + cores = Number(process.env.THREADS) || os.cpus().length; +} catch { + console.log("[API] Failed to get thread count! Using 1...") +} if (cluster.isMaster) { function getCommitOrFail() {