mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: use common plugin-api interface
This commit is contained in:
1 parent
c61c875bee
commit
70a96aecac
54 files changed
+387
-566
No files matched your search
@@ -101,7 +101,7 @@ export async function load(ctx: Context) {
|
||||
model(pending, fail, ctx),
|
||||
setting(pending, fail, require('../model/setting')),
|
||||
]);
|
||||
await require('hydrooj/src/service/server').apply(ctx);
|
||||
await require('../service/server').apply(ctx);
|
||||
await addon(pending, fail, ctx);
|
||||
const scriptDir = path.resolve(__dirname, '..', 'script');
|
||||
for (const h of await fs.readdir(scriptDir)) {
|
||||
|
||||
@@ -38,7 +38,7 @@ export async function apply(ctx: Context) {
|
||||
await modelSystem.runConfig();
|
||||
const storage = require('../service/storage');
|
||||
await storage.loadStorageService();
|
||||
await require('hydrooj/src/service/server').apply(ctx);
|
||||
await require('../service/server').apply(ctx);
|
||||
// Make sure everything is ready and then start main entry
|
||||
if (argv.options.watch) await ctx.loader.reloadPlugin(ctx, 'hydrooj/src/service/watcher', {});
|
||||
await ctx.root.start();
|
||||
|
||||
Reference in new issue
Block a user