Display update lock notification in dashboard logs

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
Cameron Diver 2019-02-13 16:35:13 +00:00
parent 5894a9baf3
commit 27b68b5845

View File

@ -584,7 +584,9 @@ module.exports = class DeviceState extends EventEmitter
delay = Math.min((2 ** @failedUpdates) * constants.backoffIncrement, @maxPollTime) delay = Math.min((2 ** @failedUpdates) * constants.backoffIncrement, @maxPollTime)
# If there was an error then schedule another attempt briefly in the future. # If there was an error then schedule another attempt briefly in the future.
if err instanceof UpdatesLockedError if err instanceof UpdatesLockedError
console.log("Updates are locked, retrying in #{delay}ms...") message = "Updates are locked, retrying in #{delay}ms..."
@logger.logSystemMessage(message)
console.log(message)
else else
console.log('Scheduling another update attempt due to failure: ', delay, err) console.log('Scheduling another update attempt due to failure: ', delay, err)
@triggerApplyTarget({ force, delay, initial }) @triggerApplyTarget({ force, delay, initial })