core: remote judge fix

This commit is contained in:
undefined committed 2022-02-13 23:31:57 +08:00
1 parent 773cc34b6e
commit 9a8557d215
4 files changed
+15 -15

No files matched your search

-1
View File
@@ -211,7 +211,6 @@ Difficulty by algorithm: 알고리즘 난이도
Difficulty displayed: 난이도 표시
Difficulty: 난이도
Disabled: 비활성
Disconnected from the server. Reconnecting...: 서버 연결이 끊어졌습니다. 재시도 중입니다...
Discussion {1} not found.: 토론 {1}이(가) 없습니다.
Discussion category {1} already exists.: 토론 분류 {1}이(가) 이미 존재합니다.
Discussion category {1} not found.: 토론 분류 {1}을(를) 찾을 수 없습니다.
-1
View File
@@ -230,7 +230,6 @@ Difficulty by algorithm: 算法计算的难度
Difficulty displayed: 显示的难度
Difficulty: 难度
Disabled: 关闭
Disconnected from the server. Reconnecting...: 到服务器的连接断开。正在重新连接...
Discussion {1} not found.: 讨论 {1} 不存在。
Discussion category {1} already exists.: 讨论分类 {1} 已经存在。
Discussion category {1} not found.: 讨论分类 {1} 不存在。
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "3.4.27",
"version": "3.4.28",
"bin": "bin/hydrooj.js",
"main": "src/loader",
"module": "src/loader",
+14 -12
View File
@@ -75,18 +75,20 @@ class RecordModel {
source = `${pdoc.domainId}/${pdoc.docId}`;
data = pdoc.data;
if (typeof pdoc.config === 'string') throw new Error(pdoc.config);
if (pdoc.config.type === 'remote_judge' && rdoc.contest.toHexString() !== '0'.repeat(24)) {
return await task.add({
...omit(rdoc, ['_id']),
priority,
type: 'remotejudge',
subType: pdoc.config.subType,
target: pdoc.config.target,
rid,
domainId,
config,
data,
});
if (pdoc.config.type === 'remote_judge') {
if (rdoc.contest?.toHexString() !== '0'.repeat(24)) {
return await task.add({
...omit(rdoc, ['_id']),
priority,
type: 'remotejudge',
subType: pdoc.config.subType,
target: pdoc.config.target,
rid,
domainId,
config,
data,
});
}
}
}
return await task.add({