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

+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({