bug fixes

This commit is contained in:
undefined committed 2022-10-05 17:20:37 +08:00
1 parent 41e10e49f5
commit 1210957a2a
4 files changed
+10 -11

No files matched your search

+2 -3
View File
@@ -4,17 +4,16 @@ import path from 'path';
import fs from 'fs-extra';
import type { JudgeResultBody } from 'hydrooj';
import {
Logger, SettingModel, StorageModel, SystemModel, TaskModel,
SettingModel, StorageModel, SystemModel, TaskModel,
} from 'hydrooj';
import { end, next } from 'hydrooj/src/handler/judge';
import { processTestdata } from '../cases';
import { getConfig } from '../config';
import { FormatError, SystemError } from '../error';
import { Context } from '../judge/interface';
import logger from '../log';
import { JudgeTask } from '../task';
const logger = new Logger('judge');
const session = {
config: { detail: SystemModel.get('hydrojudge.detail') },
async fetchFile(name: string) {
+2 -3
View File
@@ -16,7 +16,6 @@ declare module 'hydrooj' {
}
export function apply(ctx: Context) {
if (process.env.NODE_APP_INSTANCE === '0') {
ctx.once('app/started', () => require('./hosts/builtin').postInit());
}
if (process.env.NODE_APP_INSTANCE !== '0') return;
ctx.once('app/started', () => require('./hosts/builtin').postInit());
}