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:
Vasily.onl committed 2025-06-10 13:40:28 +08:00
1 parent c28e4a9aaf
commit f6cb1485b1
18 files changed
+384 -45

No files matched your search

+1 -1
View File
@@ -30,7 +30,7 @@ logging.getLogger('sqlalchemy.pool').setLevel(logging.CRITICAL)
logging.getLogger('sqlalchemy.dialects').setLevel(logging.CRITICAL)
logging.getLogger('sqlalchemy.orm').setLevel(logging.CRITICAL)
from data.collection_service import run_data_collection_service
from data.collector.collection_service import run_data_collection_service
async def get_config_timeframes(config_path: str) -> str:
+1 -1
View File
@@ -31,7 +31,7 @@ from pathlib import Path
project_root = Path(__file__).parent.parent
sys.path.insert(0, str(project_root))
from data.collection_service import run_data_collection_service
from data.collector.collection_service import run_data_collection_service
def display_banner(config_path: str, duration_hours: float = None):