use of top.hcode.hoj.pojo.dto.TestJudgeReq in project HOJ by HimitZH.
the class JudgeReceiver method handleJudgeMsg.
@Override
public void handleJudgeMsg(String taskStr, String queueName) {
if (Constants.Queue.TEST_JUDGE_WAITING.getName().equals(queueName)) {
TestJudgeReq testJudgeReq = JSONUtil.toBean(taskStr, TestJudgeReq.class);
dispatcher.dispatcherTestJudge(testJudgeReq, "/test-judge");
} else {
JSONObject task = JSONUtil.parseObj(taskStr);
Judge judge = task.get("judge", Judge.class);
String token = task.getStr("token");
// 调用判题服务
dispatcher.dispatcherJudge("judge", "/judge", new ToJudgeDTO().setJudge(judge).setToken(token).setRemoteJudgeProblem(null));
}
// 接着处理任务
processWaitingTask();
}
Aggregations