mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-20 17:52:51 +00:00
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:
parent
b0d6ced304
commit
21712ae810
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user