|
@@ -81,6 +81,8 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
|
|
|
Long studentId = examRecordData.getStudentId();
|
|
|
String sequenceLockKey = Constants.EXAM_CONTROL_LOCK_PREFIX + studentId;
|
|
|
|
|
|
+ long st = System.currentTimeMillis();
|
|
|
+
|
|
|
try {
|
|
|
debugLog("enter executor...", examRecordData.getId());
|
|
|
|
|
@@ -103,11 +105,13 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
|
|
|
Long examRecordDataId = examRecordData.getId();
|
|
|
if (ExamRecordStatus.EXAM_HAND_IN == examRecordData.getExamRecordStatus() ||
|
|
|
ExamRecordStatus.EXAM_AUTO_HAND_IN == examRecordData.getExamRecordStatus()) {
|
|
|
- this.debugLog("prepare to execute last node's hand in data...", examRecordDataId);
|
|
|
|
|
|
+ this.debugLog("prepare to execute last node's hand in data...", examRecordDataId);
|
|
|
+ long startTime = System.currentTimeMillis();
|
|
|
examRecordData = examRecordDataService.processAfterHandInExam(examRecordDataId);
|
|
|
|
|
|
- this.debugLog("execute last node's hand in data success...", examRecordDataId);
|
|
|
+ this.debugLog("T001.execute last node's hand in data success...耗时:" +
|
|
|
+ (System.currentTimeMillis() - startTime) + " ms", examRecordDataId);
|
|
|
}
|
|
|
|
|
|
//如果考试记录状态为完结状态,则开始同步数据到正式库
|
|
@@ -144,7 +148,7 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
|
|
|
//同步数据
|
|
|
syncExamDataCloudService.syncExamData(syncReq);
|
|
|
|
|
|
- this.debugLog("999 同步数据rpc共计耗时:" + (System.currentTimeMillis() - startTime) + " ms",examRecordDataId);
|
|
|
+ this.debugLog("T002.同步数据rpc耗时:" + (System.currentTimeMillis() - startTime) + " ms", examRecordDataId);
|
|
|
|
|
|
this.debugLog("sync data success,and to be change status...", examRecordDataId);
|
|
|
|
|
@@ -153,12 +157,21 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
|
|
|
if (null != examBoss) {
|
|
|
examBoss.setEndCount(examBoss.getEndCount() + 1);
|
|
|
|
|
|
+ startTime = System.currentTimeMillis();
|
|
|
+
|
|
|
examBossService.saveExamBoss(examRecordData.getExamStudentId(), examBoss);
|
|
|
+
|
|
|
+ this.debugLog("T003.考试完结次数加1,并saveExamBoss耗时..." +
|
|
|
+ (System.currentTimeMillis() - startTime) + " ms", examRecordDataId);
|
|
|
}
|
|
|
|
|
|
//设置并保存考试记录的同步状态
|
|
|
+ startTime = System.currentTimeMillis();
|
|
|
+
|
|
|
examRecordData.setSyncStatus(SyncStatus.SYNCED);
|
|
|
setAndSaveExamRecordDataSyncStatus(examRecordDataId);
|
|
|
+ this.debugLog("T004.设置并保存考试记录的同步状态,耗时..." +
|
|
|
+ (System.currentTimeMillis() - startTime) + " ms", examRecordDataId);
|
|
|
|
|
|
outList.add(new KeyValuePair<>(key, examRecordData));
|
|
|
|
|
@@ -174,6 +187,7 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
|
|
|
"'.do nothing and go to the next node...", examRecordData.getId());
|
|
|
} finally {
|
|
|
SequenceLockHelper.releaseLockSimple(sequenceLockKey);
|
|
|
+ this.debugLog("T999 同步数据合计耗时:" + (System.currentTimeMillis() - st) + " ms", examRecordData.getId());
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -318,7 +332,7 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
|
|
|
return new ArrayList<>();
|
|
|
}
|
|
|
|
|
|
- debugLog("the result joson of method getExamFaceLivenessVerifies is :"+ JsonUtil.toJson(resp),examRecordDataId);
|
|
|
+ debugLog("the result joson of method getExamFaceLivenessVerifies is :" + JsonUtil.toJson(resp), examRecordDataId);
|
|
|
|
|
|
List<ExamFaceLivenessVerifyBean> resultList = new ArrayList<>();
|
|
|
for (cn.com.qmth.examcloud.core.oe.student.api.bean.ExamFaceLivenessVerifyBean eflvb : resp.getExamFaceLivenessVerifis()) {
|