时间优化

This commit is contained in:
aixianling
2022-04-01 18:36:09 +08:00
parent d8ba3fbb83
commit ec7adbbe71
3 changed files with 4 additions and 7 deletions

View File

@@ -1,5 +1,6 @@
const db = require("../../utils/dbUitls");
const zip = require("../../tools/zipProject")
const dayjs = require("dayjs")
module.exports = {
action: "/node/autodeploy/getZip",
method: "post",
@@ -14,11 +15,10 @@ module.exports = {
response.send({code: 0})
}, 2000)
zip(info).then(() => {
db.query(`update node_autodeploy set download='${new Date()}',error='' where id='${info.id}'`)
db.query(`update node_autodeploy set download='${dayjs().format("YYYY-MM-DD HH:mm:ss")}',error='' where id='${info.id}'`)
}).catch(err => {
console.log(err)
db.query(`update node_autodeploy set error='${err}' where id='${info.id}'`)
})
} else response.send({code: 1, err: "无法找到git信息"})
}).catch(err => {