SIENTIAPDE-1325
Update environment configuration and refactor activities to include metrics controller. Remove Kafka settings and adjust Redis and MongoDB initialization. Update tests to reflect changes in initialization and metrics tracking.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from collections.abc import Hashable
|
||||
|
||||
from sientia_do.observability.metrics_controller import MetricsController
|
||||
from temporalio import activity, workflow
|
||||
|
||||
with workflow.unsafe.imports_passed_through():
|
||||
@@ -36,21 +37,22 @@ class Gates(SientiaMonitoring):
|
||||
ensure data integrity and enable flexible data processing workflows.
|
||||
"""
|
||||
|
||||
def __init__(self, logger: Logger, notification_handler: NotificationHandler):
|
||||
def __init__(self, logger: Logger, notification_handler: NotificationHandler, metrics_controller: MetricsController):
|
||||
"""
|
||||
Initialize the Gates class with logging and notification services.
|
||||
|
||||
Args:
|
||||
logger (Logger): Logger instance for operation logging
|
||||
notification_handler (NotificationHandler): Handler for system notifications
|
||||
metrics_controller (MetricsController): Metrics controller instance
|
||||
"""
|
||||
SientiaMonitoring.__init__(self, logger, notification_handler)
|
||||
SientiaMonitoring.__init__(self, logger, notification_handler, metrics_controller)
|
||||
|
||||
def close(self):
|
||||
"""
|
||||
Close the Gates class.
|
||||
"""
|
||||
SientiaMonitoring.close(self)
|
||||
SientiaMonitoring.shutdown(self)
|
||||
|
||||
def apply_aggregation(
|
||||
self, values: DataFrame, aggr_function: str, metadata: dict[str, Any]
|
||||
|
||||
Reference in New Issue
Block a user