Hello yarn berry

This commit is contained in:
undefined committed 2021-05-26 23:35:36 +08:00
1 parent 04a4306895
commit 782f334a27
62 files changed
+448 -239

No files matched your search

+5 -3
View File
@@ -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,
});