|
|
@ -81,11 +81,16 @@ public class ShortAnswerScoringJob { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 每60秒执行一次,扫描待评分的简答题 |
|
|
* 每60秒执行一次,扫描待评分和评分失败的简答题 |
|
|
*/ |
|
|
*/ |
|
|
@Scheduled(fixedRateString = "${scoring.interval-ms:60000}") |
|
|
@Scheduled(fixedRateString = "${scoring.interval-ms:60000}") |
|
|
public void processPendingScoring() { |
|
|
public void processScoring(){ |
|
|
log.debug(">>> [简答题评分任务] 开始扫描待评分简答题, batchSize={}", batchSize); |
|
|
processPendingAndFailedScoring(ExamRecordScoringStatusEnum.PENDING.getValue()); |
|
|
|
|
|
processPendingAndFailedScoring(ExamRecordScoringStatusEnum.FAILED.getValue()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void processPendingAndFailedScoring(Integer ExamRecordScoringStatus) { |
|
|
|
|
|
log.debug(">>> [简答题评分任务] 开始扫描待评分和评分失败的简答题, batchSize={}", batchSize); |
|
|
if ("local".equalsIgnoreCase(taskProps.getOwner())) { |
|
|
if ("local".equalsIgnoreCase(taskProps.getOwner())) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
@ -125,7 +130,7 @@ public class ShortAnswerScoringJob { |
|
|
if (!QuestionTypeEnum.SHORT_ANSWER.getValue().equals(snapshot.getType())) { |
|
|
if (!QuestionTypeEnum.SHORT_ANSWER.getValue().equals(snapshot.getType())) { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
if (!Objects.equals(ExamRecordScoringStatusEnum.PENDING.getValue(), snapshot.getScoringStatus())) { |
|
|
if (!Objects.equals(ExamRecordScoringStatus, snapshot.getScoringStatus())) { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|