logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: d0ec4fb8283900607e4012bb90beb959d70dd646
parent: 4428cf6f07c1496e8cbf41b4af769d5777eb124b
Author: masarakki <masaki182@gmail.com>
Date:   Sat, 22 Apr 2017 22:11:56 +0900

refactor-cores (#2308)


Diffstat:

Mstreaming/index.js2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/streaming/index.js b/streaming/index.js @@ -19,7 +19,7 @@ dotenv.config({ if (cluster.isMaster) { // cluster master - const core = +process.env.STREAMING_CLUSTER_NUM || (env === 'development' ? 1 : (os.cpus().length > 1 ? os.cpus().length - 1 : 1)) + const core = +process.env.STREAMING_CLUSTER_NUM || (env === 'development' ? 1 : Math.max(os.cpus().length - 1, 1)) const fork = () => { const worker = cluster.fork(); worker.on('exit', (code, signal) => {