SIENTIAPDE-1314

Refactor OPC Write Method and Comment Out Error Handling Logic

- Reformatted the `write_opc_data` method for improved readability by adjusting its signature.
- Commented out the error handling logic in `OpcRepository` related to disconnection due to multiple errors, preserving the original functionality for future reference.
- Updated tests to reflect the commented-out error handling, ensuring clarity in the testing process.
This commit is contained in:
vitor-aignosi
2025-10-27 07:47:11 -03:00
parent aec5839b5e
commit 80c987b2dc
3 changed files with 35 additions and 33 deletions

View File

@@ -269,7 +269,9 @@ class OPC(BaseActivity):
return success, response_times
@activity.defn(name='write_opc_data')
async def write_opc_data(self, input_data: dict[str, Any]) -> tuple[dict[Any, Any], dict[str, dict[str, float | None]]]:
async def write_opc_data(
self, input_data: dict[str, Any]
) -> tuple[dict[Any, Any], dict[str, dict[str, float | None]]]:
"""
Write prediction and confidence data to OPC servers. The two writing
operations are optional and independent of each other.