SIENTIAPDE-1199
Update dependencies and refactor logging imports for observability - Updated the sientia-dataops-library dependency version to 1.4.0 in requirements.txt. - Changed image tag in values.yaml from 0.3.2 to 0.4.1. - Refactored logging imports across multiple files to use the new observability module instead of the temporal.utils.logger. - Updated retry policy imports in workflow files to reflect the new module structure.
This commit is contained in:
@@ -9,7 +9,7 @@ from asyncua.ua import DataValue, Variant, VariantType, DateTime
|
||||
from regex import F
|
||||
from sientia_do.notifications.handlers import CoreNotificationHandler as NotificationHandler
|
||||
from sientia_do.notifications.models import NotificationLevel
|
||||
from sientia_do.temporal.utils.logger import Logger
|
||||
from sientia_do.observability.logger import Logger
|
||||
from laborious import metrics
|
||||
|
||||
data_type_map = {
|
||||
@@ -189,6 +189,7 @@ class OpcRepository():
|
||||
|
||||
self.logger.error(
|
||||
f"OPC server {self.id} is not connected")
|
||||
|
||||
if self.last_reconnection_time is None or (datetime.now() - self.last_reconnection_time).total_seconds(
|
||||
) > self.reconnection_interval:
|
||||
self.disconnect()
|
||||
@@ -196,7 +197,12 @@ class OpcRepository():
|
||||
f"Trying to reconnect to OPC server {self.id}...")
|
||||
return self.connect()
|
||||
|
||||
return False, {}
|
||||
return False, {
|
||||
"notification_id": f"OPC_CONNECTION_AWAITING_RECONNECTION_WINDOW_{self.id}",
|
||||
"message": f"OPC server {self.id} is not connected, waiting for next reconnection window...",
|
||||
"block": "opc_repository",
|
||||
"level": NotificationLevel.WARNING
|
||||
}
|
||||
|
||||
return True, {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user