From f52e4aa2e16201523a1d71107a61ee7185e48cf5 Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Sun, 11 Oct 2020 07:31:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BB=B4=E6=8A=A4=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routes/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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}部署中`})