From 9b68d3d5a7f59f1c936086f86e9c3cbbdd156359 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Fri, 23 Feb 2024 13:10:53 +0800 Subject: [PATCH] f --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index b12821f..b91e878 100644 --- a/index.js +++ b/index.js @@ -169,7 +169,7 @@ function fork(options) { }); for (var i = 0; i < count; i++) { - const env = { CFORK_WORKER_INDEX: String(i), CFORK_WORKER_COUNT: count }; + const env = { CFORK_WORKER_INDEX: String(i), CFORK_WORKER_COUNT: String(count) }; newWorker = forkWorker(null, env); newWorker._clusterSettings = cluster.settings; newWorker._clusterWorkerEnv = env; @@ -181,7 +181,7 @@ function fork(options) { slaves.map(normalizeSlaveConfig) .forEach(function(settings, index) { if (settings) { - const env = { CFORK_SLAVE_WORKER_INDEX: String(index), CFORK_SLAVE_WORKER_COUNT: slaves.length }; + const env = { CFORK_SLAVE_WORKER_INDEX: String(index), CFORK_SLAVE_WORKER_COUNT: String(slaves.length) }; newWorker = forkWorker(settings, env); newWorker._clusterSettings = settings; newWorker._clusterWorkerEnv = env;