Browse Source

刷新状态

Leo 2 years ago
parent
commit
1063808b26
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/module/tasklog/component/TaskLogWatcher.jsx

+ 2 - 2
src/module/tasklog/component/TaskLogWatcher.jsx

@@ -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)
         }
       }