增加vjudge的等待账号调度超时时间为240s
This commit is contained in:
parent
5a45c2f272
commit
f6829e3bc0
|
@ -44,18 +44,18 @@
|
|||
|
||||
```json
|
||||
{
|
||||
// 题目支持的语言如下,可增加与减少
|
||||
// 题目支持的语言如下,可多可少
|
||||
"languages": ["C", "C++", "Java", "Python3", "Python2", "Golang", "C#"],
|
||||
"samples": [
|
||||
{
|
||||
"output": "1.in",
|
||||
"input": "1.out",
|
||||
//"score": 10 // 如果是io题目需要给测试点加得分
|
||||
"input": "1.in",
|
||||
"output": "1.out",
|
||||
//"score": 10 // 如果是oi题目需要给测试点加得分
|
||||
},
|
||||
{
|
||||
"output": "2.in",
|
||||
"input": "2.out",
|
||||
//"score": 10 // 如果是io题目需要给测试点加得分
|
||||
"input": "2.in",
|
||||
"output": "2.out",
|
||||
//"score": 10 // 如果是oi题目需要给测试点加得分
|
||||
}
|
||||
],
|
||||
"tags": ["测试题","测试"], // 题目标签,一般不超过三个
|
||||
|
@ -127,5 +127,5 @@
|
|||
|
||||
**注意:**
|
||||
|
||||
- HDU的题号一般是 1000以上的数字
|
||||
- HDU和POJ的题号一般是 1000以上的数字
|
||||
- Codeforces的题号是1000A、1000B、这种数字加大写英文字母的格式
|
|
@ -63,7 +63,7 @@ public class Dispatcher {
|
|||
|
||||
|
||||
public void toJudge(String path, ToJudge data, Long submitId, Boolean isRemote) {
|
||||
// 尝试30s
|
||||
// 尝试600s
|
||||
ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
|
||||
AtomicInteger count = new AtomicInteger(0);
|
||||
Runnable getResultTask = new Runnable() {
|
||||
|
|
|
@ -46,7 +46,7 @@ public class RemoteJudgeDispatcher {
|
|||
remoteJudgeReceiver.processWaitingTask();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("调用redis将判题纳入判题等待队列异常,此次判题任务判为系统错误--------------->{}", e.getMessage());
|
||||
log.error("调用redis将判题纳入判题等待队列异常,此次判题任务判为系统错误--------------->{}", e);
|
||||
judgeService.failToUseRedisPublishJudge(judge.getSubmitId(), judge.getPid(), isContest);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -167,15 +167,16 @@ public class RemoteJudgeReceiver {
|
|||
tryAgainNum + 1, false);
|
||||
}
|
||||
} else {
|
||||
if (tryAgainNum >= 30) {
|
||||
if (tryAgainNum >= 120) {
|
||||
// 获取调用多次失败可能为系统忙碌,判为提交失败
|
||||
judge.setStatus(Constants.Judge.STATUS_SUBMITTED_FAILED.getStatus());
|
||||
judge.setErrorMessage("Failed to connect the judgeServer. Please resubmit this submission again!");
|
||||
judge.setErrorMessage("Submission failed! Please resubmit this submission again!" +
|
||||
"Cause: Waiting for account scheduling timeout");
|
||||
judgeService.updateById(judge);
|
||||
} else {
|
||||
|
||||
try {
|
||||
TimeUnit.SECONDS.sleep(1);
|
||||
TimeUnit.SECONDS.sleep(2);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue