Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Deprecation] Deprecate setupMaster in favor of setupClusterManager #1752

Merged
merged 1 commit into from
Jun 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/cli/cluster/cluster.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
2 changes: 1 addition & 1 deletion src/cli/cluster/cluster_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
3 changes: 2 additions & 1 deletion src/cli/cluster/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -44,7 +45,7 @@ export type ClusterWorker = cluster.Worker & {
exitCode?: number;
};

cluster.setupMaster({
setupClusterManager({
exec: cliPath,
silent: false,
});
Expand Down