File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22
3- if ( require ( "fs" ) . existsSync ( "./data/users" ) ) {
3+ if ( require ( "fs" ) . existsSync ( "./data/users" ) || process . env [ "IS_WORKER" ] === "true" ) {
44 console . log ( "Docker Env already configured." ) ;
55 require ( "../lib/main.js" ) ;
66} else {
Original file line number Diff line number Diff line change 11--- lib/engine.js 2021-06-17 19:03:36.000000000 +0000
22+++ /tmp/engine.js 2021-12-04 09:50:13.000000000 +0000
3- @@ -152,7 +152,8 @@
3+ @@ -152,7 +152,12 @@
44 this.server.on('day', function() {
55 self.archiveLogs();
66 } );
77-
88+ // for docker env
9- + self.goMaster();
9+ + if (process.env["IS_WORKER"] === "true") {
10+ + self.goSlave();
11+ + } else {
12+ + self.goMaster();
13+ + }
1014 // determine master server eligibility
1115 this.checkMasterEligibility( function() {
1216 // master mode (CLI option) -- force us to become master right away
You can’t perform that action at this time.
0 commit comments