Files
sientia-dataops-scouter_tem…/scouter/utils/connectors_config.py
vitor-aignosi cf7f9fb63c SIENTIAPDE-1478
Refactor PIWebAPIClient and Update Configuration Imports

- Removed outdated PostgreSQL, Redis, MongoDB, and API configuration functions from connectors_config.py.
- Deleted the pi_web_api_client.py file as part of the refactor.
- Updated imports in worker.py and api.py to use the new repository structure.
- Cleaned up scenarios.md by removing obsolete scenarios related to unique constraint violations.
- Commented out the specific version of the sientia-dataops-library in requirements.txt for flexibility.
2026-01-08 12:41:53 -03:00

20 lines
693 B
Python

from os import getenv
from typing import Any
def build_kafka_config() -> dict[str, Any]:
"""
Build Kafka configuration from environment variables.
Returns:
dict[str, Any]: Kafka configuration dictionary with keys:
- bootstrap_servers: Kafka broker addresses (default: localhost:9092)
- polling_time: Consumer polling interval in milliseconds (default: 1000)
- group_id: Consumer group identifier (default: scouter-group)
"""
return {
'bootstrap_servers': getenv('KAFKA_BOOTSTRAP_SERVERS', 'localhost:9092'),
'polling_time': int(getenv('KAFKA_POLLING_TIME', '1000')),
'group_id': 'scouter-group',
}