修复监听构建任务的id获取异常问题
This commit is contained in:
@@ -69,8 +69,8 @@ const handleZip = (id, ws) => {
|
|||||||
startUpdateSql()
|
startUpdateSql()
|
||||||
.then(() => progress.set(30, id))
|
.then(() => progress.set(30, id))
|
||||||
.then(() => fse.emptyDir(dist || `../zips/${deploy}`))
|
.then(() => fse.emptyDir(dist || `../zips/${deploy}`))
|
||||||
.then(() => http.get(`/view/devops/job/${buildConfig.task}/buildWithParameters`, {params: {token: buildConfig.token, pid: id, dist:deploy}}))
|
.then(() => http.get(`/view/devops/job/${buildConfig.task}/buildWithParameters`, {params: {token: buildConfig.token, pid: id, dist: deploy}}))
|
||||||
.then(() => http.get(`/view/devops/job/${buildConfig.task}/api/json`).then(res => res.data?.id || 1))
|
.then(() => http.get(`/view/devops/job/${buildConfig.task}/api/json`).then(res => (res.data?.nextBuildNumber - 1) || 1))
|
||||||
.then(currentJob => new Promise((resolve, reject) => {
|
.then(currentJob => new Promise((resolve, reject) => {
|
||||||
jobs[id] = {task: buildConfig.task, build: currentJob}
|
jobs[id] = {task: buildConfig.task, build: currentJob}
|
||||||
const timer = setInterval(() => {
|
const timer = setInterval(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user