打包失败优化
This commit is contained in:
@@ -8,7 +8,8 @@ module.exports = {
|
||||
dbUtils.query(sql).then(res => {
|
||||
let info = res?.[0]
|
||||
if (info?.id) {
|
||||
fse.pathExists(`zips/${info.id}/dist`, (err, exists) => {
|
||||
if (info.err) response.send({code: 1, err: info.err})
|
||||
else fse.pathExists(`zips/${info.id}/dist`, (err, exists) => {
|
||||
console.log(`zips/${info.id}/dist=========>${exists}`)
|
||||
response.send({code: 0, data: exists})
|
||||
})
|
||||
|
||||
@@ -12,8 +12,9 @@ module.exports = {
|
||||
response.send({code: 0})
|
||||
}, 2000)
|
||||
zip(info).then(() => {
|
||||
db.query(`update node_autodeploy set download='${new Date()}' where id='${info.id}'`)
|
||||
db.query(`update node_autodeploy set download='${new Date()}',error='' where id='${info.id}'`)
|
||||
}).catch(err => {
|
||||
db.query(`update node_autodeploy set error='${err}' where id='${info.id}'`)
|
||||
console.log(err)
|
||||
})
|
||||
} else response.send({code: 1, err: "无法找到git信息"})
|
||||
|
||||
Reference in New Issue
Block a user