mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
markdown语法增强,错误修复
This commit is contained in:
1 parent
4b3c10b4eb
commit
a29b801e72
22 files changed
+311
-200
No files matched your search
+15
-10
@@ -38,14 +38,17 @@ async function next(body) {
|
||||
const $set = {};
|
||||
const $push = {};
|
||||
if (body.case) {
|
||||
body.case.memory = body.case.memory_kb;
|
||||
body.case.time = body.case.time_ms;
|
||||
rdoc.testCases.push(body.case);
|
||||
$push.testCases = body.case;
|
||||
const c = {};
|
||||
c.memory = body.case.memory_kb || body.case.memory;
|
||||
c.time = body.case.time_ms || body.case.time;
|
||||
c.judgeText = body.case.judge_text || body.case.judgeText || body.case.message;
|
||||
c.status = body.case.status;
|
||||
rdoc.testCases.push(c);
|
||||
$push.testCases = c;
|
||||
}
|
||||
if (body.judge_text) {
|
||||
rdoc.judgeTexts.push(body.judge_text);
|
||||
$push.judgeTexts = body.judge_text;
|
||||
if (body.judge_text || body.message) {
|
||||
rdoc.judgeTexts.push(body.judge_text || body.message);
|
||||
$push.judgeTexts = body.judge_text || body.message;
|
||||
}
|
||||
if (body.compiler_text) {
|
||||
rdoc.compilerTexts.push(body.compiler_text);
|
||||
@@ -53,8 +56,9 @@ async function next(body) {
|
||||
}
|
||||
if (body.status) $set.status = body.status;
|
||||
if (body.score) $set.score = body.score;
|
||||
if (body.time_ms) $set.time = body.time_ms;
|
||||
if (body.memory_kb) $set.memory = body.memory_kb;
|
||||
if (body.time_ms) $set.time = body.time_ms || body.time;
|
||||
if (body.memory_kb) $set.memory = body.memory_kb || body.memory;
|
||||
if (body.progress) $set.progress = body.progress;
|
||||
rdoc = await record.update(body.domainId, body.rid, $set, $push);
|
||||
bus.publish('record_change', rdoc);
|
||||
}
|
||||
@@ -63,6 +67,7 @@ async function end(body) {
|
||||
let rdoc = await record.get(body.domainId, body.rid);
|
||||
const $set = {};
|
||||
const $push = {};
|
||||
const $unset = { progress: '' };
|
||||
if (body.judge_text) {
|
||||
rdoc.judgeTexts.push(body.judge_text);
|
||||
$push.judgeTexts = body.judge_text;
|
||||
@@ -77,7 +82,7 @@ async function end(body) {
|
||||
if (body.memory_kb) $set.memory = body.memory_kb;
|
||||
$set.judgeAt = new Date();
|
||||
$set.judger = body.judger;
|
||||
rdoc = await record.update(body.domainId, body.rid, $set, $push);
|
||||
rdoc = await record.update(body.domainId, body.rid, $set, $push, $unset);
|
||||
await _postJudge(rdoc);
|
||||
rdoc = await record.update(body.domainId, body.rid, $set, $push);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user