work on new di system
This commit is contained in:
parent
4096e91e67
commit
0c77449584
11 changed files with 161 additions and 39 deletions
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
|
||||
import type { IDataIngestionServices } from '@stock-bot/di';
|
||||
import { createServiceAdapter } from '@stock-bot/di';
|
||||
import { QMHandler } from './qm/qm.handler';
|
||||
import { WebShareHandler } from './webshare/webshare.handler';
|
||||
|
||||
|
|
@ -11,15 +12,18 @@ import { WebShareHandler } from './webshare/webshare.handler';
|
|||
* Initialize and register all handlers
|
||||
*/
|
||||
export function initializeAllHandlers(services: IDataIngestionServices): void {
|
||||
// Create generic service container adapter
|
||||
const serviceContainer = createServiceAdapter(services);
|
||||
|
||||
// QM Handler
|
||||
const qmHandler = new QMHandler(services);
|
||||
const qmHandler = new QMHandler(serviceContainer);
|
||||
qmHandler.register();
|
||||
|
||||
// WebShare Handler
|
||||
const webShareHandler = new WebShareHandler(services);
|
||||
const webShareHandler = new WebShareHandler(serviceContainer);
|
||||
webShareHandler.register();
|
||||
|
||||
// TODO: Add other handlers here as they're converted
|
||||
// const ibHandler = new IBHandler(services);
|
||||
// const ibHandler = new IBHandler(serviceContainer);
|
||||
// ibHandler.register();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue