mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
vjudge: ensure dependencies
This commit is contained in:
1 parent
11822146e5
commit
ad9501311f
3 files changed
+7
-5
No files matched your search
@@ -140,7 +140,7 @@ class RecordDetailHandler extends Handler {
|
||||
const rdoc = await record.get(domainId, rid);
|
||||
if (rdoc) {
|
||||
await record.reset(domainId, rid, true);
|
||||
await record.judge(domainId, rid, 0);
|
||||
await record.judge(domainId, rid, -10);
|
||||
}
|
||||
this.back();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/vjudge",
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"description": "Submit problems to remote oj",
|
||||
"main": "package.json",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
@@ -10,11 +10,13 @@
|
||||
"dependencies": {
|
||||
"@hydrooj/utils": "workspace:*",
|
||||
"jsdom": "^16.7.0",
|
||||
"lodash": "^4.17.21",
|
||||
"superagent": "^6.1.0",
|
||||
"superagent-proxy": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jsdom": "^16.2.13",
|
||||
"@types/lodash": "^4.14.172",
|
||||
"@types/superagent": "^4.1.12",
|
||||
"@types/superagent-proxy": "^2.0.1"
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ export default class LuoguProvider implements IBasicProvider {
|
||||
const done = {};
|
||||
let fail = 0;
|
||||
let count = 0;
|
||||
while (count < 60 && fail < 5) {
|
||||
while (count < 120 && fail < 5) {
|
||||
await sleep(1500);
|
||||
count++;
|
||||
try {
|
||||
@@ -135,8 +135,9 @@ export default class LuoguProvider implements IBasicProvider {
|
||||
}
|
||||
logger.info('Fetched with length', JSON.stringify(body).length);
|
||||
const total = flattenDeep(body.currentData.testCaseGroup).length;
|
||||
logger.info(total);
|
||||
logger.info(!!data.detail.judgeResult);
|
||||
// TODO sorted
|
||||
if (data.detail.judgeResult) {
|
||||
for (const subtask of data.detail.judgeResult?.subtasks || []) {
|
||||
for (const cid of Object.keys(subtask.testCases)) {
|
||||
if (done[`${subtask.id}.${cid}`]) continue;
|
||||
@@ -154,7 +155,6 @@ export default class LuoguProvider implements IBasicProvider {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (data.status < 2) continue;
|
||||
logger.info('RecordID:', id, 'done');
|
||||
// TODO calc total status
|
||||
|
||||
Reference in new issue
Block a user