TCPDashboard/data/__init__.py
Vasily.onl 41f0e8e6b6 Refactor BaseDataCollector to integrate ConnectionManager for connection handling
- Extracted connection management logic into a new `ConnectionManager` class, promoting separation of concerns and enhancing modularity.
- Updated `BaseDataCollector` to utilize the `ConnectionManager` for connection, disconnection, and reconnection processes, improving code clarity and maintainability.
- Refactored connection-related methods and attributes, ensuring consistent error handling and logging practices.
- Enhanced the `OKXCollector` to implement the new connection management approach, streamlining its connection logic.
- Added unit tests for the `ConnectionManager` to validate its functionality and ensure robust error handling.

These changes improve the architecture of the data collector, aligning with project standards for maintainability and performance.
2025-06-09 17:42:06 +08:00

26 lines
740 B
Python

"""
Data collection and processing package for the Crypto Trading Bot Platform.
This package contains modules for collecting market data from various exchanges,
processing and validating the data, and storing it in the database.
"""
from .base_collector import (
BaseDataCollector, DataCollectorError, DataValidationError,
CollectorStatus, OHLCVData
)
from .common.data_types import DataType, MarketDataPoint
from .collector_manager import CollectorManager, ManagerStatus, CollectorConfig
__all__ = [
'BaseDataCollector',
'DataCollectorError',
'DataValidationError',
'DataType',
'CollectorStatus',
'MarketDataPoint',
'OHLCVData',
'CollectorManager',
'ManagerStatus',
'CollectorConfig'
]