SIENTIAPDE-1174
Update BaseActivity initialization in manager classes to disable error counter metric - Modified the initialization of DataManager, IngestorManager, OpcManager, and ResourceManager to include 'set_error_counter_metric=False' for improved error handling.
This commit is contained in:
@@ -96,7 +96,8 @@ class DataManager(BaseActivity):
|
|||||||
)
|
)
|
||||||
|
|
||||||
BaseActivity.__init__(self, logger=logger,
|
BaseActivity.__init__(self, logger=logger,
|
||||||
notification_handler=notification_handler)
|
notification_handler=notification_handler,
|
||||||
|
set_error_counter_metric=False)
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
"""Closes the Kafka producer connection."""
|
"""Closes the Kafka producer connection."""
|
||||||
|
|||||||
@@ -56,7 +56,8 @@ class IngestorManager(BaseActivity):
|
|||||||
self.metadata = metadata
|
self.metadata = metadata
|
||||||
|
|
||||||
BaseActivity.__init__(self, logger=logger,
|
BaseActivity.__init__(self, logger=logger,
|
||||||
notification_handler=notification_handler)
|
notification_handler=notification_handler,
|
||||||
|
set_error_counter_metric=False)
|
||||||
|
|
||||||
def initialize_opc_from_config(self, server_config: dict) -> OpcManager | None:
|
def initialize_opc_from_config(self, server_config: dict) -> OpcManager | None:
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -35,7 +35,8 @@ class OpcManager(BaseActivity):
|
|||||||
pod_id=self.pod_id, server_name=self.name).set(0)
|
pod_id=self.pod_id, server_name=self.name).set(0)
|
||||||
|
|
||||||
BaseActivity.__init__(self, logger=logger,
|
BaseActivity.__init__(self, logger=logger,
|
||||||
notification_handler=notification_handler)
|
notification_handler=notification_handler,
|
||||||
|
set_error_counter_metric=False)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f"OpcManager(name={self.name}, url={self.url}, server_uri={self.server_uri})\n" \
|
return f"OpcManager(name={self.name}, url={self.url}, server_uri={self.server_uri})\n" \
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ class ResourceManager(BaseActivity):
|
|||||||
self.metadata = metadata
|
self.metadata = metadata
|
||||||
|
|
||||||
BaseActivity.__init__(self, logger=logger,
|
BaseActivity.__init__(self, logger=logger,
|
||||||
notification_handler=notification_handler)
|
notification_handler=notification_handler,
|
||||||
|
set_error_counter_metric=False)
|
||||||
|
|
||||||
def _execute_redis_op(self, operation_name: str, func, *args, **kwargs):
|
def _execute_redis_op(self, operation_name: str, func, *args, **kwargs):
|
||||||
"""Wrapper to execute Redis operations and record metrics."""
|
"""Wrapper to execute Redis operations and record metrics."""
|
||||||
|
|||||||
Reference in New Issue
Block a user