mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
feat: search with sonic
This commit is contained in:
1 parent
5d01c81607
commit
43c4bfd8e7
43 files changed
+512
-317
No files matched your search
@@ -3,6 +3,7 @@ import * as yaml from 'js-yaml';
|
||||
import * as judge from './judge';
|
||||
import { ValidationError } from '../error';
|
||||
import * as check from '../check';
|
||||
import { Logger } from '../logger';
|
||||
import * as setting from '../model/setting';
|
||||
import * as system from '../model/system';
|
||||
import user from '../model/user';
|
||||
@@ -17,6 +18,8 @@ import {
|
||||
validate, isEmail, isUname, isPassword,
|
||||
} from '../lib/validator';
|
||||
|
||||
const logger = new Logger('manage');
|
||||
|
||||
function set(key: string, value: any) {
|
||||
if (setting.SYSTEM_SETTINGS_BY_KEY[key]) {
|
||||
const s = setting.SYSTEM_SETTINGS_BY_KEY[key];
|
||||
@@ -125,11 +128,12 @@ class SystemScriptHandler extends SystemHandler {
|
||||
})
|
||||
.catch((err: Error) => {
|
||||
const time = new Date().getTime() - start;
|
||||
logger.error(err);
|
||||
judge.end({
|
||||
domainId,
|
||||
rid,
|
||||
status: STATUS.STATUS_SYSTEM_ERROR,
|
||||
message: `${err} \n${err.stack} `,
|
||||
message: `${err.message} \n${err.stack} `,
|
||||
judger: 1,
|
||||
time,
|
||||
memory: 0,
|
||||
|
||||
Reference in new issue
Block a user