|
@@ -153,7 +153,7 @@ const TaskLogWatcher = () => {
|
|
|
const { data } = await getTaskLog(params)
|
|
|
if (data.code === 200) {
|
|
|
setLogData(data.data.log)
|
|
|
- if (!['success', 'failed'].includes(data.data.status) && autoRefresh) {
|
|
|
+ if (![2, 3].includes(data.data.status) && autoRefresh) {
|
|
|
timeout = setTimeout(() => {
|
|
|
fetchTaskLog(params)
|
|
|
}, 5000)
|
|
@@ -161,7 +161,7 @@ const TaskLogWatcher = () => {
|
|
|
const index = jobList.findIndex(item => item.key === record.key)
|
|
|
const list = [...jobList]
|
|
|
if (list[index]) {
|
|
|
- list[index].handleResult = data.data.status === 'success' ? 2 : 3
|
|
|
+ list[index].handleResult = data.data.status
|
|
|
setJobList(list)
|
|
|
}
|
|
|
}
|