How to use the cluster.setupMaster function in cluster

To help you get started, we’ve selected a few cluster examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nodules / luster / lib / master.js View on Github external
async _run() {
        await this.whenInitialized();

        cluster.setupMaster(this._masterOpts);

        // TODO maybe run this after starting waitForAllWorkers
        this.forEach(worker => worker.run());

        await this.waitForAllWorkers('worker ready');

        this.emit('running');
    }

cluster

extensible multi-core server manager

MIT
Latest version published 13 years ago

Package Health Score

56 / 100
Full package analysis