Avoid marking the supervisor as unhealthy if update is not happening because it's in offline mode

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
This commit is contained in:
Pablo Carranza Velez 2017-12-11 11:03:04 -08:00
parent 03da927b08
commit 4b96ccbcc2

View File

@ -137,7 +137,7 @@ application.localMode = false
application.healthy = ->
timeSinceLastCycle = process.hrtime(updateStatus.lastFullUpdateCycle)[0] * 1000
return updateStatus.currentlyDownloading or timeSinceLastCycle - updateStatus.timeSpentPulling <= 2 * config.appUpdatePollInterval
return bootstrap.offlineMode or updateStatus.currentlyDownloading or timeSinceLastCycle - updateStatus.timeSpentPulling <= 2 * config.appUpdatePollInterval
application.logSystemMessage = logSystemMessage = (message, obj, eventName) ->
logger.log({ m: message, s: 1 })