mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-20 03:36:41 +00:00
Clear backoff counter on new target state
Change-type: patch Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
parent
34397cc045
commit
5ace459ad2
@ -342,6 +342,10 @@ module.exports = class DeviceState extends EventEmitter
|
||||
Promise.using @_inferStepsLock, -> fn()
|
||||
|
||||
setTarget: (target, localSource = false) ->
|
||||
# When we get a new target state, clear any built up apply errors
|
||||
# This means that we can attempt to apply the new state instantly
|
||||
@failedUpdates = 0
|
||||
|
||||
Promise.join(
|
||||
@config.get('apiEndpoint'),
|
||||
validateState(target),
|
||||
|
Loading…
Reference in New Issue
Block a user