mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
bus: remove legacy import * usage support
This commit is contained in:
1 parent
bd63331137
commit
aeb9d4cf50
17 files changed
+16
-24
No files matched your search
@@ -114,14 +114,6 @@ export function apply(ctx: Context) {
|
||||
}
|
||||
|
||||
export default app;
|
||||
export const on = (a, b, c?) => app.on(a, b, c);
|
||||
export const once = (a, b, c?) => app.once(a, b, c);
|
||||
export const parallel = app.parallel.bind(app);
|
||||
export const emit = app.parallel.bind(app);
|
||||
export const bail = app.bail.bind(app);
|
||||
// For backward compatibility
|
||||
export const serial: any = app.parallel.bind(app);
|
||||
export const broadcast = app.broadcast.bind(app);
|
||||
|
||||
global.Hydro.service.bus = app as any;
|
||||
global.bus = app;
|
||||
@@ -7,7 +7,7 @@ import { Time } from '@hydrooj/utils';
|
||||
import { ValidationError } from '../error';
|
||||
import { Logger } from '../logger';
|
||||
import { load } from '../options';
|
||||
import * as bus from './bus';
|
||||
import bus from './bus';
|
||||
|
||||
const logger = new Logger('mongo');
|
||||
export interface Collections { }
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { StatusUpdate } from '@hydrooj/utils/lib/sysinfo';
|
||||
import * as sysinfo from '@hydrooj/utils/lib/sysinfo';
|
||||
import { Context } from '../context';
|
||||
import { Logger } from '../logger';
|
||||
import * as bus from './bus';
|
||||
import bus from './bus';
|
||||
import db from './db';
|
||||
|
||||
const coll = db.collection('status');
|
||||
|
||||
Reference in new issue
Block a user