Test for both 'id' and 'Id' when docker responds with image info

This commit is contained in:
Petros Angelatos 2014-07-04 01:08:40 +01:00 committed by Pablo Carranza Vélez
parent 58035f8b24
commit 3ae3668221

View File

@ -47,10 +47,11 @@ exports.update = ->
currentSupervisorImage currentSupervisorImage
]) ])
.spread (localImageInfo, currentSupervisorImage) -> .spread (localImageInfo, currentSupervisorImage) ->
if localImageInfo.Id == currentSupervisorImage localImageId = localImageInfo.Id or localImageInfo.id
if localImageId is currentSupervisorImage
utils.mixpanelTrack('Supervisor up to date') utils.mixpanelTrack('Supervisor up to date')
return return
utils.mixpanelTrack('Supervisor update start', image: localImageInfo.Id) utils.mixpanelTrack('Supervisor update start', image: localImageId)
docker.createContainerAsync( docker.createContainerAsync(
Image: localImage Image: localImage
Cmd: ['/start'] Cmd: ['/start']