created a service container and moved all possible stuff to it to make light index files with reusable container
This commit is contained in:
parent
9a5e87ef4a
commit
eeb5d1aca2
7 changed files with 766 additions and 633 deletions
|
|
@ -7,10 +7,10 @@ import type { IServiceContainer } from '@stock-bot/handlers';
|
|||
import { autoRegisterHandlers } from '@stock-bot/handlers';
|
||||
import { getLogger } from '@stock-bot/logger';
|
||||
// Import handlers for bundling (ensures they're included in the build)
|
||||
import './qm/qm.handler';
|
||||
import './webshare/webshare.handler';
|
||||
import './ceo/ceo.handler';
|
||||
import './ib/ib.handler';
|
||||
import './qm/qm.handler';
|
||||
import './webshare/webshare.handler';
|
||||
|
||||
// Add more handler imports as needed
|
||||
|
||||
|
|
@ -46,18 +46,10 @@ export async function initializeAllHandlers(serviceContainer: IServiceContainer)
|
|||
/**
|
||||
* Manual fallback registration
|
||||
*/
|
||||
async function manualHandlerRegistration(serviceContainer: any): Promise<void> {
|
||||
async function manualHandlerRegistration(_serviceContainer: any): Promise<void> {
|
||||
logger.warn('Falling back to manual handler registration');
|
||||
|
||||
try {
|
||||
// // Import and register handlers manually
|
||||
// const { QMHandler } = await import('./qm/qm.handler');
|
||||
// const qmHandler = new QMHandler(serviceContainer);
|
||||
// qmHandler.register();
|
||||
|
||||
// const { WebShareHandler } = await import('./webshare/webshare.handler');
|
||||
// const webShareHandler = new WebShareHandler(serviceContainer);
|
||||
// webShareHandler.register();
|
||||
|
||||
logger.info('Manual handler registration complete');
|
||||
} catch (error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue