diff --git a/routes/index.js b/routes/index.js index e7e6afb..1b3e068 100644 --- a/routes/index.js +++ b/routes/index.js @@ -72,14 +72,12 @@ router.post('/deploy', function(req, res, next) { }); spawnObj.on('close', function (code) { info('close code : ' + code); - - dingding(`${name}|${description}自动部署成功,花费时间:${moment().diff(startTime, 'seconds', true)}秒`) }) spawnObj.on('exit', (code) => { info('exit code : ' + code); resolve(true) }) - }) + }).then(res=>dingding(`${name}|${description}自动部署成功,花费时间:${moment().diff(startTime, 'seconds', true)}秒`)).catch(err=>error(err)) res.json({message: `仓库代码${req.body.repository.ssh_url}部署中`})