diff --git a/ingestor/managers/opc_manager.py b/ingestor/managers/opc_manager.py index 113473f..09ee184 100644 --- a/ingestor/managers/opc_manager.py +++ b/ingestor/managers/opc_manager.py @@ -197,7 +197,7 @@ class OpcManager(BaseActivity): self.client.name = self.pod_id self.client.application_name = self.pod_id - pod_uri = f'urn:sientia-do:pod:{self.pod_id}' + pod_uri = self.pod_id.replace('-', ':') self.client.application_uri = pod_uri self.client.product_uri = pod_uri @@ -347,7 +347,7 @@ class OpcManager(BaseActivity): await self.client.disconnect() return [] except Exception as e: - self.logger.error(f'Failed to disconnect from OPC UA server: {e}') + self.logger.error(f'Failed to disconnect from OPC UA serve in attempt {i+1} of 5: {e}') error_stack.append({ 'attempt': i+1, 'error': str(e), @@ -387,7 +387,7 @@ class OpcManager(BaseActivity): self.logger.error(f'Failed to clean up subscription: {sub_error}') - errors = self.disconnection_fallback() + errors = await self.disconnection_fallback() if errors: self.send_notification(