There is no need to resolve currentSupervisor again as we have already resolved it.

This commit is contained in:
Pagan Gazzard 2014-10-07 20:10:23 +01:00 committed by Pablo Carranza Vélez
parent 7e3c9707cb
commit cd7ee9b82f

View File

@ -113,11 +113,8 @@ exports.initialised = currentSupervisor.then (currentSupervisor) ->
stream.on('end', resolve)
.then ->
console.log('Inspecting new supervisor:', remoteImage)
Promise.all([
docker.getImage(remoteImage).inspectAsync()
currentSupervisor
])
.spread (localImageInfo, currentSupervisor) ->
docker.getImage(remoteImage).inspectAsync()
.then (localImageInfo) ->
localImageId = localImageInfo.Id or localImageInfo.id
if localImageId is currentSupervisor.Image
utils.mixpanelTrack('Supervisor up to date')