SIENTIAPDE-1169
Refactor OPC data writing and repository initialization - Simplified success tracking logic in the OPC class for writing prediction and confidence data. - Removed unused pod_id attribute from OpcRepository initialization. - Updated test cases to include pod_id for improved metrics tracking during data writing operations.
This commit is contained in:
@@ -152,8 +152,7 @@ class OPC(BaseActivity):
|
||||
if local_success:
|
||||
self.info(
|
||||
f"Prediction data written to OPC server {server_id} for tag {tag}.", metadata)
|
||||
else:
|
||||
success = success and local_success
|
||||
success = success and local_success
|
||||
|
||||
if 'confidence_tags' in config:
|
||||
for tag, tag_config in config['confidence_tags'].items():
|
||||
@@ -168,8 +167,7 @@ class OPC(BaseActivity):
|
||||
if local_success:
|
||||
self.info(
|
||||
f"Confidence data written to OPC server {server_id} for tag {tag}.", metadata)
|
||||
else:
|
||||
success = success and local_success
|
||||
success = success and local_success
|
||||
|
||||
return self.process_confidence(data, success, metadata)
|
||||
|
||||
|
||||
@@ -93,7 +93,6 @@ class OpcRepository():
|
||||
)
|
||||
self.client.secure_channel_timeout = 10000000
|
||||
self.client.session_timeout = 10000000
|
||||
self.pod_id = pod_id
|
||||
|
||||
def connect(self) -> tuple[bool, dict[str, Any]]:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user