后续收尾

This commit is contained in:
aixianling
2024-10-18 10:34:07 +08:00
parent bd8c7ebecb
commit 3d5bce566e

View File

@@ -77,7 +77,8 @@ const handleZip = (id, ws) => {
http.get(`/view/devops/job/${buildConfig.task}/${currentJob}/api/json`).then(res => { http.get(`/view/devops/job/${buildConfig.task}/${currentJob}/api/json`).then(res => {
if (['SUCCESS', 'UNSTABLE'].includes(res.data.result)) { if (['SUCCESS', 'UNSTABLE'].includes(res.data.result)) {
clearInterval(timer) clearInterval(timer)
resolve(endUpdateSql()) progress.set(90, id)
endUpdateSql().then(resolve)
} else if (res.data.result == 'ABORTED') { } else if (res.data.result == 'ABORTED') {
clearInterval(timer) clearInterval(timer)
reject("构建取消") reject("构建取消")
@@ -86,15 +87,18 @@ const handleZip = (id, ws) => {
reject("构建失败") reject("构建失败")
} }
}) })
}, 1000) }, 2000)
})).catch(err => { }))
console.log(err) .then(() => db.detail({table: "node_custom_config", id}))
const msg = `执行失败:${err.cmd || err}` .then(row => progress.finish(row))
return errorUpdateSql(msg) .catch(err => {
.then(() => db.detail({table: "node_custom_config", id})) console.log(err)
.then(row => progress.stop(row)) const msg = `执行失败:${err.cmd || err}`
.catch(() => 0) return errorUpdateSql(msg)
}) .then(() => db.detail({table: "node_custom_config", id}))
.then(row => progress.stop(row))
.catch(() => 0)
})
} else { } else {
const buildPath = { const buildPath = {
web: 'base-web', wxwork: 'base-wxcp', mp: 'dvcp_v2_wxmp' web: 'base-web', wxwork: 'base-wxcp', mp: 'dvcp_v2_wxmp'