From 1550f86008782b2d755916369170e174012e10f6 Mon Sep 17 00:00:00 2001 From: OptimisticSide <47266822+optimisticside@users.noreply.github.com> Date: Sun, 2 Jan 2022 17:12:42 -0800 Subject: [PATCH] Replaced isMaster with isPrimary --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4324766..d5b58d7 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ In the example below, the variable `options` is passed to the admiral. [Read the Here is an example of `index.js`: ```js -const { isMaster } = require('cluster'); +const { isPrimary } = require('cluster'); const { Fleet } = require('eris-fleet'); const path = require('path'); const { inspect } = require('util'); @@ -85,7 +85,7 @@ const options = { const Admiral = new Fleet(options); -if (isMaster) { +if (isPrimary) { // Code to only run for your master process Admiral.on('log', m => console.log(m)); Admiral.on('debug', m => console.debug(m)); @@ -288,4 +288,4 @@ module.exports = {BotWorker, Eris}; ## Using ES Modules -Instead of using the file path, you can use ES Modules by passing your BotWorker class to `options.BotWorker` and your ServiceWorker class to `ServiceWorker` in the `options.services` array. See [test/](https://github.com/danclay/eris-fleet/tree/master/test) for examples. \ No newline at end of file +Instead of using the file path, you can use ES Modules by passing your BotWorker class to `options.BotWorker` and your ServiceWorker class to `ServiceWorker` in the `options.services` array. See [test/](https://github.com/danclay/eris-fleet/tree/master/test) for examples.