diff --git a/src/cli/cluster/cluster.mock.ts b/src/cli/cluster/cluster.mock.ts index fa494128e909..fa153130c096 100644 --- a/src/cli/cluster/cluster.mock.ts +++ b/src/cli/cluster/cluster.mock.ts @@ -78,5 +78,7 @@ class MockClusterFork extends EventEmitter { export class MockCluster extends EventEmitter { fork = jest.fn(() => new MockClusterFork(this)); + /** @deprecated use setupClusterManager */ setupMaster = jest.fn(); + setupClusterManager = jest.fn(); } diff --git a/src/cli/cluster/cluster_manager.ts b/src/cli/cluster/cluster_manager.ts index 7e09a820b249..827628ec6183 100644 --- a/src/cli/cluster/cluster_manager.ts +++ b/src/cli/cluster/cluster_manager.ts @@ -135,7 +135,7 @@ export class ClusterManager { }); // When receive that event from server worker - // forward a reloadLoggingConfig message to master + // forward a reloadLoggingConfig message to cluster manager // and all workers. This is only used by LogRotator service // when the cluster mode is enabled this.server.on('reloadLoggingConfigFromServerWorker', () => { diff --git a/src/cli/cluster/worker.ts b/src/cli/cluster/worker.ts index d69708793b23..19f2c666dc50 100644 --- a/src/cli/cluster/worker.ts +++ b/src/cli/cluster/worker.ts @@ -30,6 +30,7 @@ import _ from 'lodash'; import cluster from 'cluster'; +import { setupMaster as setupClusterManager } from 'cluster'; import { EventEmitter } from 'events'; import { BinderFor } from './binder_for'; @@ -44,7 +45,7 @@ export type ClusterWorker = cluster.Worker & { exitCode?: number; }; -cluster.setupMaster({ +setupClusterManager({ exec: cliPath, silent: false, });