mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
upgrade to cordis v3 (#733)
Co-authored-by: panda <panda_dtdyy@outlook.com>
This commit is contained in:
1 parent
498cd57016
commit
a56b1650be
33 files changed
+301
-262
No files matched your search
@@ -171,7 +171,7 @@ class VJudgeService extends Service {
|
||||
if (account.enableOn && !account.enableOn.includes(os.hostname())) continue;
|
||||
this.pool[`${account.type}/${account.handle}`] = new AccountService(provider, account);
|
||||
}
|
||||
this.caller?.on('dispose', () => {
|
||||
this[Context.current]?.on('dispose', () => {
|
||||
// TODO dispose session
|
||||
});
|
||||
}
|
||||
@@ -193,7 +193,6 @@ export { BasicFetcher } from './fetch';
|
||||
export { VERDICT } from './verdict';
|
||||
export * from './interface';
|
||||
|
||||
Context.service('vjudge', VJudgeService);
|
||||
export const name = 'vjudge';
|
||||
export async function apply(ctx: Context) {
|
||||
if (process.env.NODE_APP_INSTANCE !== '0') return;
|
||||
@@ -205,6 +204,7 @@ export async function apply(ctx: Context) {
|
||||
vjudge.addProvider(k, v);
|
||||
}
|
||||
// });
|
||||
ctx.provide('vjudge');
|
||||
ctx.vjudge = vjudge;
|
||||
ctx.check.addChecker('Vjudge', async (_ctx, log, warn, error) => {
|
||||
const working = [];
|
||||
|
||||
Reference in new issue
Block a user