后续收尾

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,8 +87,11 @@ const handleZip = (id, ws) => {
reject("构建失败") reject("构建失败")
} }
}) })
}, 1000) }, 2000)
})).catch(err => { }))
.then(() => db.detail({table: "node_custom_config", id}))
.then(row => progress.finish(row))
.catch(err => {
console.log(err) console.log(err)
const msg = `执行失败:${err.cmd || err}` const msg = `执行失败:${err.cmd || err}`
return errorUpdateSql(msg) return errorUpdateSql(msg)