lideyin преди 5 години
родител
ревизия
9765e6b038

+ 2 - 1
examcloud-core-oe-task-service/src/main/java/cn/com/qmth/examcloud/core/oe/task/service/pipeline/AfterHandInExamExecutor.java

@@ -2,6 +2,7 @@ package cn.com.qmth.examcloud.core.oe.task.service.pipeline;
 
 
 import cn.com.qmth.examcloud.commons.exception.StatusException;
 import cn.com.qmth.examcloud.commons.exception.StatusException;
 import cn.com.qmth.examcloud.commons.helpers.KeyValuePair;
 import cn.com.qmth.examcloud.commons.helpers.KeyValuePair;
+import cn.com.qmth.examcloud.commons.helpers.ObjectHolder;
 import cn.com.qmth.examcloud.commons.helpers.pipeline.NodeExecuter;
 import cn.com.qmth.examcloud.commons.helpers.pipeline.NodeExecuter;
 import cn.com.qmth.examcloud.commons.helpers.pipeline.TaskContext;
 import cn.com.qmth.examcloud.commons.helpers.pipeline.TaskContext;
 import cn.com.qmth.examcloud.commons.logging.ExamCloudLog;
 import cn.com.qmth.examcloud.commons.logging.ExamCloudLog;
@@ -58,7 +59,7 @@ public class AfterHandInExamExecutor implements NodeExecuter<Long, ExamRecordDat
     @Override
     @Override
     public void execute(Long key, ExamRecordData examRecordData,
     public void execute(Long key, ExamRecordData examRecordData,
                         List<KeyValuePair<Long, ExamRecordData>> outList,
                         List<KeyValuePair<Long, ExamRecordData>> outList,
-                        Boolean removable, TaskContext context) throws Exception {
+                        ObjectHolder<Boolean> removable, TaskContext context) throws Exception {
 
 
         String sequenceLockKey = Constants.EXAM_CONTROL_LOCK_PREFIX + examRecordData.getStudentId();
         String sequenceLockKey = Constants.EXAM_CONTROL_LOCK_PREFIX + examRecordData.getStudentId();
 
 

+ 2 - 1
examcloud-core-oe-task-service/src/main/java/cn/com/qmth/examcloud/core/oe/task/service/pipeline/ClearExamDataCacheExecutor.java

@@ -1,6 +1,7 @@
 package cn.com.qmth.examcloud.core.oe.task.service.pipeline;
 package cn.com.qmth.examcloud.core.oe.task.service.pipeline;
 
 
 import cn.com.qmth.examcloud.commons.helpers.KeyValuePair;
 import cn.com.qmth.examcloud.commons.helpers.KeyValuePair;
+import cn.com.qmth.examcloud.commons.helpers.ObjectHolder;
 import cn.com.qmth.examcloud.commons.helpers.pipeline.NodeExecuter;
 import cn.com.qmth.examcloud.commons.helpers.pipeline.NodeExecuter;
 import cn.com.qmth.examcloud.commons.helpers.pipeline.TaskContext;
 import cn.com.qmth.examcloud.commons.helpers.pipeline.TaskContext;
 import cn.com.qmth.examcloud.commons.logging.ExamCloudLog;
 import cn.com.qmth.examcloud.commons.logging.ExamCloudLog;
@@ -43,7 +44,7 @@ public class ClearExamDataCacheExecutor implements NodeExecuter<Long, ExamRecord
     @Override
     @Override
     public void execute(Long key, ExamRecordData examRecordData,
     public void execute(Long key, ExamRecordData examRecordData,
                         List<KeyValuePair<Long, ExamRecordData>> outList,
                         List<KeyValuePair<Long, ExamRecordData>> outList,
-                        Boolean removable, TaskContext context) throws Exception {
+                        ObjectHolder<Boolean> removable, TaskContext context) throws Exception {
 
 
         String sequenceLockKey = Constants.EXAM_CONTROL_LOCK_PREFIX + examRecordData.getStudentId();
         String sequenceLockKey = Constants.EXAM_CONTROL_LOCK_PREFIX + examRecordData.getStudentId();
 
 

+ 2 - 1
examcloud-core-oe-task-service/src/main/java/cn/com/qmth/examcloud/core/oe/task/service/pipeline/DataGainExamExecutor.java

@@ -3,6 +3,7 @@ package cn.com.qmth.examcloud.core.oe.task.service.pipeline;
 import java.util.Date;
 import java.util.Date;
 import java.util.List;
 import java.util.List;
 
 
+import cn.com.qmth.examcloud.commons.helpers.ObjectHolder;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 import org.springframework.stereotype.Component;
 
 
@@ -38,7 +39,7 @@ public class DataGainExamExecutor implements NodeExecuter<Long, ExamRecordData,
 
 
     @Override
     @Override
     public void execute(Long key, ExamRecordData value, List<KeyValuePair<Long, ExamRecordData>> outList,
     public void execute(Long key, ExamRecordData value, List<KeyValuePair<Long, ExamRecordData>> outList,
-            Boolean removable, TaskContext context) throws Exception {
+                        ObjectHolder<Boolean> removable, TaskContext context) throws Exception {
         // 获取考试信息id
         // 获取考试信息id
         Long startId = 0l;
         Long startId = 0l;
         GetExamRecordDataIdsReq req = new GetExamRecordDataIdsReq();
         GetExamRecordDataIdsReq req = new GetExamRecordDataIdsReq();

+ 4 - 4
examcloud-core-oe-task-service/src/main/java/cn/com/qmth/examcloud/core/oe/task/service/pipeline/HandInExamExecutor.java

@@ -5,6 +5,7 @@ import java.util.Date;
 import java.util.List;
 import java.util.List;
 
 
 import cn.com.qmth.examcloud.commons.exception.StatusException;
 import cn.com.qmth.examcloud.commons.exception.StatusException;
+import cn.com.qmth.examcloud.commons.helpers.ObjectHolder;
 import cn.com.qmth.examcloud.commons.helpers.pipeline.SimpleNode;
 import cn.com.qmth.examcloud.commons.helpers.pipeline.SimpleNode;
 import cn.com.qmth.examcloud.commons.logging.ExamCloudLog;
 import cn.com.qmth.examcloud.commons.logging.ExamCloudLog;
 import cn.com.qmth.examcloud.commons.logging.ExamCloudLogFactory;
 import cn.com.qmth.examcloud.commons.logging.ExamCloudLogFactory;
@@ -58,7 +59,7 @@ public class HandInExamExecutor implements NodeExecuter<Long, ExamRecordData, Lo
     @Override
     @Override
     public void execute(Long key, ExamRecordData examRecordData,
     public void execute(Long key, ExamRecordData examRecordData,
                         List<KeyValuePair<Long, ExamRecordData>> outList,
                         List<KeyValuePair<Long, ExamRecordData>> outList,
-                        Boolean removable, TaskContext context) throws Exception {
+                        ObjectHolder<Boolean> removable, TaskContext context) throws Exception {
 
 
         String sequenceLockKey = Constants.EXAM_CONTROL_LOCK_PREFIX + examRecordData.getStudentId();
         String sequenceLockKey = Constants.EXAM_CONTROL_LOCK_PREFIX + examRecordData.getStudentId();
 
 
@@ -112,7 +113,7 @@ public class HandInExamExecutor implements NodeExecuter<Long, ExamRecordData, Lo
                         examRecordDataService.saveExamRecordDataCache(examRecordData.getId(), examRecordData);
                         examRecordDataService.saveExamRecordDataCache(examRecordData.getId(), examRecordData);
 
 
                         outList.clear();
                         outList.clear();
-                        removable = false;
+                        removable.set(false);
 
 
                         this.errorLog("auto hand in occurs error,to be retry...", e, examRecordData.getId());
                         this.errorLog("auto hand in occurs error,to be retry...", e, examRecordData.getId());
 
 
@@ -121,7 +122,7 @@ public class HandInExamExecutor implements NodeExecuter<Long, ExamRecordData, Lo
                 }
                 }
 
 
                 //如果不需要自动交卷,则需要下次轮循,继续处理
                 //如果不需要自动交卷,则需要下次轮循,继续处理
-                removable = false;
+                removable.set(false);
                 outList.clear();
                 outList.clear();
 
 
                 this.debugLog("don't need auto hand in.to be retry...", examRecordData.getId());
                 this.debugLog("don't need auto hand in.to be retry...", examRecordData.getId());
@@ -187,5 +188,4 @@ public class HandInExamExecutor implements NodeExecuter<Long, ExamRecordData, Lo
             LOG.error("[HAND-IN-EXAM-EXECUTOR-" + examRecordDataId + "]:" + msg, e);
             LOG.error("[HAND-IN-EXAM-EXECUTOR-" + examRecordDataId + "]:" + msg, e);
         }
         }
     }
     }
-
 }
 }

+ 2 - 1
examcloud-core-oe-task-service/src/main/java/cn/com/qmth/examcloud/core/oe/task/service/pipeline/SyncExamDataExecutor.java

@@ -1,6 +1,7 @@
 package cn.com.qmth.examcloud.core.oe.task.service.pipeline;
 package cn.com.qmth.examcloud.core.oe.task.service.pipeline;
 
 
 import cn.com.qmth.examcloud.commons.helpers.KeyValuePair;
 import cn.com.qmth.examcloud.commons.helpers.KeyValuePair;
+import cn.com.qmth.examcloud.commons.helpers.ObjectHolder;
 import cn.com.qmth.examcloud.commons.helpers.pipeline.NodeExecuter;
 import cn.com.qmth.examcloud.commons.helpers.pipeline.NodeExecuter;
 import cn.com.qmth.examcloud.commons.helpers.pipeline.TaskContext;
 import cn.com.qmth.examcloud.commons.helpers.pipeline.TaskContext;
 import cn.com.qmth.examcloud.commons.logging.ExamCloudLog;
 import cn.com.qmth.examcloud.commons.logging.ExamCloudLog;
@@ -74,7 +75,7 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
     @Override
     @Override
     public void execute(Long key, ExamRecordData examRecordData,
     public void execute(Long key, ExamRecordData examRecordData,
                         List<KeyValuePair<Long, ExamRecordData>> outList,
                         List<KeyValuePair<Long, ExamRecordData>> outList,
-                        Boolean removable, TaskContext context) throws Exception {
+                        ObjectHolder<Boolean> removable, TaskContext context) throws Exception {
 
 
         Long studentId = examRecordData.getStudentId();
         Long studentId = examRecordData.getStudentId();
         String sequenceLockKey = Constants.EXAM_CONTROL_LOCK_PREFIX + studentId;
         String sequenceLockKey = Constants.EXAM_CONTROL_LOCK_PREFIX + studentId;