update judgeserver api

This commit is contained in:
Himit_ZH 2021-11-30 12:46:11 +08:00
parent 9860fe5e14
commit e358a78a8c
1 changed files with 2 additions and 2 deletions

View File

@ -79,14 +79,14 @@ public class JudgeController {
res.put("cpu", Runtime.getRuntime().availableProcessors());
if (maxTaskNum == -1) {
res.put("maxTaskNum", Runtime.getRuntime().availableProcessors() * 2);
res.put("maxTaskNum", Runtime.getRuntime().availableProcessors() + 1);
} else {
res.put("maxTaskNum", maxTaskNum);
}
if (isOpenRemoteJudge) {
res.put("isOpenRemoteJudge", true);
if (RemoteJudgeMaxTaskNum == -1) {
res.put("remoteJudgeMaxTaskNum", Runtime.getRuntime().availableProcessors() * 4);
res.put("remoteJudgeMaxTaskNum", Runtime.getRuntime().availableProcessors() * 2 + 1);
} else {
res.put("remoteJudgeMaxTaskNum", RemoteJudgeMaxTaskNum);
}