modern decodators
This commit is contained in:
parent
8405f44bd9
commit
931f212ec7
6 changed files with 262 additions and 150 deletions
|
|
@ -9,19 +9,19 @@ import { Hono } from 'hono';
|
|||
import { cors } from 'hono/cors';
|
||||
|
||||
// Library imports
|
||||
import {
|
||||
createDataIngestionServices,
|
||||
disposeDataIngestionServices,
|
||||
type IDataIngestionServices
|
||||
} from '@stock-bot/di';
|
||||
import { getLogger, setLoggerConfig, shutdownLoggers } from '@stock-bot/logger';
|
||||
import { Shutdown } from '@stock-bot/shutdown';
|
||||
import { ProxyManager } from '@stock-bot/utils';
|
||||
import {
|
||||
createDataIngestionServices,
|
||||
disposeDataIngestionServices,
|
||||
type IDataIngestionServices
|
||||
} from '@stock-bot/di';
|
||||
import { handlerRegistry } from '@stock-bot/types';
|
||||
import { ProxyManager } from '@stock-bot/utils';
|
||||
|
||||
// Local imports
|
||||
import { createRoutes } from './routes/create-routes';
|
||||
import { initializeQMProviderNew } from './handlers/qm/qm.handler';
|
||||
import { initializeAllHandlers } from './handlers';
|
||||
|
||||
const config = initializeServiceConfig();
|
||||
console.log('Data Service Configuration:', JSON.stringify(config, null, 2));
|
||||
|
|
@ -84,19 +84,14 @@ async function initializeServices() {
|
|||
// Initialize handlers with new DI pattern
|
||||
logger.debug('Initializing data handlers with new DI pattern...');
|
||||
|
||||
// Initialize QM handler with new pattern
|
||||
initializeQMProviderNew(services);
|
||||
|
||||
// TODO: Convert other handlers to new pattern
|
||||
// initializeWebShareProviderNew(services);
|
||||
// initializeIBProviderNew(services);
|
||||
// initializeProxyProviderNew(services);
|
||||
// Auto-register all handlers
|
||||
initializeAllHandlers(services);
|
||||
|
||||
logger.info('Data handlers initialized with new DI pattern');
|
||||
|
||||
// Create scheduled jobs from registered handlers
|
||||
logger.debug('Creating scheduled jobs from registered handlers...');
|
||||
const allHandlers = handlerRegistry.getAllHandlers();
|
||||
const allHandlers = handlerRegistry.getAllHandlersWithSchedule();
|
||||
|
||||
let totalScheduledJobs = 0;
|
||||
for (const [handlerName, config] of allHandlers) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue