|
@@ -98,24 +98,18 @@ 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());
|
|
|
-
|
|
|
//添加考试控制全局锁
|
|
|
SequenceLockHelper.getLockSimple(sequenceLockKey);
|
|
|
|
|
|
- debugLog("get locker success...", examRecordData.getId());
|
|
|
-
|
|
|
//如果已同步,直接交给下一节点
|
|
|
if (SyncStatus.SYNCED == examRecordData.getSyncStatus()) {
|
|
|
-
|
|
|
outList.add(new KeyValuePair<>(key, examRecordData));
|
|
|
|
|
|
- this.debugLog("already synced,will go to next node...", examRecordData.getId());
|
|
|
-
|
|
|
+ LOG.info("syncExamData already synced, tempExamRecordDataId = {}, examStudentId = {}",
|
|
|
+ examRecordData.getId(), examRecordData.getExamStudentId());
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -178,13 +172,10 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
|
|
|
syncReq.setExamRecordData(copyExamRecordDataFrom(examRecordData));
|
|
|
|
|
|
long startTime = System.currentTimeMillis();
|
|
|
-
|
|
|
//同步数据
|
|
|
syncExamDataCloudService.syncExamData(syncReq);
|
|
|
-
|
|
|
- this.debugLog("T002.同步数据rpc耗时:" + (System.currentTimeMillis() - startTime) + " ms", examRecordDataId);
|
|
|
-
|
|
|
- this.debugLog("sync data success,and to be change status...", examRecordDataId);
|
|
|
+ LOG.info("syncExamData ok, tempExamRecordDataId = {}, examStudentId = {}, cost {} ms",
|
|
|
+ examRecordDataId, examRecordData.getExamStudentId(), System.currentTimeMillis() - startTime);
|
|
|
|
|
|
//考试完结次数加1
|
|
|
ExamBoss examBoss = examBossService.getExamBoss(examRecordData.getExamStudentId());
|