mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
bug fixes
This commit is contained in:
1 parent
41e10e49f5
commit
1210957a2a
4 files changed
+10
-11
No files matched your search
@@ -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) {
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
Reference in new issue
Block a user