mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
vjudge: add CheckService (#599)
This commit is contained in:
1 parent
807bfb53e3
commit
9da4340a97
8 files changed
+129
-62
No files matched your search
@@ -3,7 +3,6 @@ import { inspect } from 'util';
|
||||
import * as yaml from 'js-yaml';
|
||||
import { omit } from 'lodash';
|
||||
import Schema from 'schemastery';
|
||||
import * as check from '../check';
|
||||
import {
|
||||
CannotEditSuperAdminError, NotLaunchedByPM2Error, UserNotFoundError, ValidationError,
|
||||
} from '../error';
|
||||
@@ -14,6 +13,7 @@ import record from '../model/record';
|
||||
import * as setting from '../model/setting';
|
||||
import * as system from '../model/system';
|
||||
import user from '../model/user';
|
||||
import { check } from '../service/check';
|
||||
import {
|
||||
ConnectionHandler, Handler, param, requireSudo, Types,
|
||||
} from '../service/server';
|
||||
@@ -71,7 +71,7 @@ class SystemCheckConnHandler extends ConnectionHandler {
|
||||
const log = (payload: any) => this.send({ type: 'log', payload });
|
||||
const warn = (payload: any) => this.send({ type: 'warn', payload });
|
||||
const error = (payload: any) => this.send({ type: 'error', payload });
|
||||
await check.start(this, log, warn, error, (id) => { this.id = id; });
|
||||
await check.run(this, log, warn, error, (id) => { this.id = id; });
|
||||
}
|
||||
|
||||
async cleanup() {
|
||||
|
||||
Reference in new issue
Block a user