Skip taking the lock when updating the releaseId or imageId for a service that comes from a legacy supervisor

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
This commit is contained in:
Pablo Carranza Velez 2018-03-13 18:00:03 -03:00
parent 9dfb76d2c8
commit de654ec60e

View File

@ -267,6 +267,7 @@ module.exports = class ApplicationManager extends EventEmitter
if step.options?.removeImage
@images.removeByDockerId(step.current.image)
updateMetadata: (step, { force = false, skipLock = false } = {}) =>
skipLock or= checkTruthy(step.current.labels['io.resin.legacy-container'])
@_lockingIfNecessary step.current.appId, { force, skipLock: skipLock or step.options?.skipLock }, =>
@services.updateMetadata(step.current, step.target)
restart: (step, { force = false, skipLock = false } = {}) =>