SIENTIAPDE-1312
Update OpcManager to set a timeout for the client connection - Added a timeout parameter to the Client initialization in OpcManager to enhance connection reliability and prevent indefinite blocking during connection attempts.
This commit is contained in:
@@ -192,7 +192,7 @@ class OpcManager(BaseActivity):
|
|||||||
|
|
||||||
metrics.OPC_CONNECTIONS_TOTAL.labels(pod_id=self.pod_id, server_name=self.name).inc()
|
metrics.OPC_CONNECTIONS_TOTAL.labels(pod_id=self.pod_id, server_name=self.name).inc()
|
||||||
try:
|
try:
|
||||||
self.client = Client(self.url, watchdog_intervall=3600000)
|
self.client = Client(self.url, timeout=10, watchdog_intervall=3600000)
|
||||||
assert self.client is not None # Informa ao mypy que client não é None
|
assert self.client is not None # Informa ao mypy que client não é None
|
||||||
|
|
||||||
self.client.name = self.pod_id
|
self.client.name = self.pod_id
|
||||||
|
|||||||
Reference in New Issue
Block a user