mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-21 01:46:28 +08:00
Hello yarn berry
This commit is contained in:
1 parent
04a4306895
commit
782f334a27
62 files changed
+448
-239
No files matched your search
@@ -3,9 +3,9 @@ import path from 'path';
|
||||
import axios from 'axios';
|
||||
import fs from 'fs-extra';
|
||||
import WebSocket from 'ws';
|
||||
import { argv } from 'yargs';
|
||||
import cac from 'cac';
|
||||
import { noop } from 'lodash';
|
||||
import { ObjectID } from 'bson';
|
||||
import { ObjectID } from 'mongodb';
|
||||
import { LangConfig } from '@hydrooj/utils/lib/lang';
|
||||
import * as tmpfs from '../tmpfs';
|
||||
import log from '../log';
|
||||
@@ -17,6 +17,8 @@ import readCases from '../cases';
|
||||
import judge from '../judge';
|
||||
import * as sysinfo from '../sysinfo';
|
||||
|
||||
const argv = cac().parse();
|
||||
|
||||
class JudgeTask {
|
||||
stat: Record<string, Date>;
|
||||
session: any;
|
||||
@@ -86,7 +88,7 @@ class JudgeTask {
|
||||
});
|
||||
} else {
|
||||
log.error(e);
|
||||
this.next({ message: { message: e.message, params: e.params || [], ...argv.debug ? { stack: e.stack } : {} } });
|
||||
this.next({ message: { message: e.message, params: e.params || [], ...argv.options.debug ? { stack: e.stack } : {} } });
|
||||
this.end({
|
||||
status: STATUS_SYSTEM_ERROR, score: 0, time_ms: 0, memory_kb: 0,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user