Change the update retry to back off to the standard update check interval

This means that the supervisor will be less aggressive in the case of the api experiencing issues, stopping it from compounding the issue if the api is being overloaded

Change-type: patch
This commit is contained in:
Pagan Gazzard 2017-10-24 15:36:43 -07:00
parent b0d6ced304
commit 21712ae810

View File

@ -830,7 +830,7 @@ application.update = update = (force, scheduled = false) ->
if updateStatus.state in [ UPDATE_REQUIRED, UPDATE_SCHEDULED ]
console.log('Updating failed, but there is already another update scheduled immediately: ', err)
return
delayTime = Math.min((2 ** updateStatus.failed) * 500, 30000)
delayTime = Math.min((2 ** updateStatus.failed) * 500, config.appUpdatePollInterval)
# If there was an error then schedule another attempt briefly in the future.
console.log('Scheduling another update attempt due to failure: ', delayTime, err)
setTimeout(update, delayTime, force, true)