Implement data collection architecture with modular components
- Introduced a comprehensive data collection framework, including `CollectorServiceConfig`, `BaseDataCollector`, and `CollectorManager`, enhancing modularity and maintainability. - Developed `CollectorFactory` for streamlined collector creation, promoting separation of concerns and improved configuration handling. - Enhanced `DataCollectionService` to utilize the new architecture, ensuring robust error handling and logging practices. - Added `TaskManager` for efficient management of asynchronous tasks, improving performance and resource management. - Implemented health monitoring and auto-recovery features in `CollectorManager`, ensuring reliable operation of data collectors. - Updated imports across the codebase to reflect the new structure, ensuring consistent access to components. These changes significantly improve the architecture and maintainability of the data collection service, aligning with project standards for modularity, performance, and error handling.
This commit is contained in:
@@ -14,7 +14,7 @@ from dataclasses import dataclass
|
||||
|
||||
|
||||
@dataclass
|
||||
class ServiceConfigSchema:
|
||||
class CollectorServiceConfigSchema:
|
||||
"""Schema definition for service configuration."""
|
||||
exchange: str = "okx"
|
||||
connection: Dict[str, Any] = None
|
||||
@@ -24,7 +24,7 @@ class ServiceConfigSchema:
|
||||
database: Dict[str, Any] = None
|
||||
|
||||
|
||||
class ServiceConfig:
|
||||
class CollectorServiceConfig:
|
||||
"""Manages service configuration with validation and security."""
|
||||
|
||||
def __init__(self, config_path: str = "config/data_collection.json", logger=None):
|
||||
Reference in New Issue
Block a user