mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-21 01:46:28 +08:00
judge: support run
This commit is contained in:
1 parent
19e14fc90f
commit
5b92200108
2 files changed
+8
-2
No files matched your search
@@ -70,7 +70,8 @@ class JudgeTask {
|
||||
tmpfs.mount(this.tmpdir, '512m');
|
||||
log.info('Submission: %s/%s/%s pid=%s', this.host, this.domainId, this.rid, this.pid);
|
||||
try {
|
||||
await this.doSubmission();
|
||||
if (typeof this.input === 'string') await this.run();
|
||||
else await this.doSubmission();
|
||||
} catch (e) {
|
||||
if (e instanceof CompileError) {
|
||||
this.next({ compiler_text: compilerText(e.stdout, e.stderr) });
|
||||
@@ -96,6 +97,11 @@ class JudgeTask {
|
||||
fs.removeSync(this.tmpdir);
|
||||
}
|
||||
|
||||
async run() {
|
||||
this.stat.judge = new Date();
|
||||
await judge.run.judge(this);
|
||||
}
|
||||
|
||||
async doSubmission() {
|
||||
this.stat.cache_start = new Date();
|
||||
this.folder = await this.session.cacheOpen(this.domainId, this.pid, this.data, this.next);
|
||||
|
||||
Reference in new issue
Block a user