Skip to content

Commit

Permalink
fix(core): set max server reboots to 2
Browse files Browse the repository at this point in the history
  • Loading branch information
slvnperron committed Oct 1, 2019
1 parent 5714b34 commit 99f3550
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bp/cluster.ts
Expand Up @@ -6,7 +6,7 @@ const debug = DEBUG('cluster')

const msgHandlers: { [messageType: string]: (message: any, worker: cluster.Worker) => void } = {}

const maxReboots = process.core_env.BP_MAX_SERVER_REBOOT || 5
const maxReboots = process.core_env.BP_MAX_SERVER_REBOOT || 2
let rebootCount = 0

/**
Expand All @@ -21,7 +21,7 @@ export const registerMsgHandler = (messageType: string, handler: (message: any,
}

export const setupMasterNode = (logger: sdk.Logger) => {
registerMsgHandler('reboot_server', (message, worker) => {
registerMsgHandler('reboot_server', (_message, worker) => {
logger.warn(`Restarting server...`)
worker.disconnect()
worker.kill()
Expand Down

0 comments on commit 99f3550

Please sign in to comment.