Bugfix for ordering of migration

This commit is contained in:
Kasra Bigdeli
2019-01-27 23:07:14 -08:00
parent 551c2b5f07
commit 17295f1305
+18 -16
View File
@@ -248,22 +248,7 @@ export default class MigrateCaptainDuckDuck {
repoInfo.repo = extracted.repo
}
return appStore
.updateAppDefinitionInDb(
appName,
Number(app.instanceCount),
app.envVars || [],
app.volumes || [],
app.nodeId || '',
!!app.notExposeAsWebApp,
80,
!!app.forceSsl,
app.ports || [],
repoInfo,
self.authenticator,
app.customNginxConfig,
app.preDeployFunction
)
return Promise.resolve()
.then(function() {
const customDomains = app.customDomain || []
const hasDefaultSubDomainSsl = !!app.hasDefaultSubDomainSsl
@@ -332,6 +317,23 @@ export default class MigrateCaptainDuckDuck {
deployedVersion
)
})
.then(function() {
return appStore.updateAppDefinitionInDb(
appName,
Number(app.instanceCount),
app.envVars || [],
app.volumes || [],
app.nodeId || '',
!!app.notExposeAsWebApp,
80,
!!app.forceSsl,
app.ports || [],
repoInfo,
self.authenticator,
app.customNginxConfig,
app.preDeployFunction
)
})
})
promises.push(p)
})