Initial proxy manager refactor
This commit is contained in:
parent
84cb14680b
commit
da916222c1
6 changed files with 58 additions and 37 deletions
|
|
@ -11,6 +11,7 @@ import { getLogger, setLoggerConfig, shutdownLoggers } from '@stock-bot/logger';
|
|||
import { connectMongoDB } from '@stock-bot/mongodb-client';
|
||||
import { connectPostgreSQL } from '@stock-bot/postgres-client';
|
||||
import { QueueManager, type QueueManagerConfig } from '@stock-bot/queue';
|
||||
import { ProxyManager } from '@stock-bot/utils';
|
||||
import { Shutdown } from '@stock-bot/shutdown';
|
||||
// Local imports
|
||||
import { exchangeRoutes, healthRoutes, queueRoutes } from './routes';
|
||||
|
|
@ -116,8 +117,7 @@ async function initializeServices() {
|
|||
|
||||
// Initialize proxy manager
|
||||
logger.debug('Initializing proxy manager...');
|
||||
const { proxyManager } = await import('@stock-bot/utils');
|
||||
await proxyManager.initialize();
|
||||
await ProxyManager.initialize();
|
||||
logger.info('Proxy manager initialized');
|
||||
|
||||
// Initialize providers (register handlers and scheduled jobs)
|
||||
|
|
@ -257,4 +257,4 @@ startServer().catch(error => {
|
|||
|
||||
logger.info('Data service startup initiated');
|
||||
|
||||
// Queue manager is available via QueueManager.getInstance() singleton pattern
|
||||
// ProxyManager class and singleton instance are available via @stock-bot/utils
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue