mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 17:46:28 +08:00
migrate: lazyload scripts
This commit is contained in:
1 parent
80e944ae7e
commit
57796912e4
4 files changed
+44
-51
No files matched your search
@@ -4,7 +4,7 @@ import mysql from 'mysql';
|
||||
import TurndownService from 'turndown';
|
||||
import {
|
||||
buildContent, ContestModel, DomainModel, fs, noop, NotFoundError, ObjectID, postJudge, ProblemModel,
|
||||
RecordDoc, RecordModel, Schema, SolutionModel, STATUS, SystemModel, Time, UserModel,
|
||||
RecordDoc, RecordModel, SolutionModel, STATUS, SystemModel, Time, UserModel,
|
||||
} from 'hydrooj';
|
||||
|
||||
const turndown = new TurndownService({
|
||||
@@ -298,18 +298,3 @@ export async function run({
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
export const apply = (ctx) => ctx.addScript(
|
||||
'migrateHustoj', 'migrate from hustoj',
|
||||
Schema.object({
|
||||
host: Schema.string().required(),
|
||||
port: Schema.number().required(),
|
||||
name: Schema.string().required(),
|
||||
username: Schema.string().required(),
|
||||
password: Schema.string().required(),
|
||||
domainId: Schema.string().required(),
|
||||
contestType: Schema.string().required(),
|
||||
dataDir: Schema.string().required(),
|
||||
}),
|
||||
run,
|
||||
);
|
||||
Reference in new issue
Block a user