From 390e439a18d2ce6b2a3e74fac756c2356ab7107b Mon Sep 17 00:00:00 2001 From: vitor-aignosi Date: Wed, 27 Aug 2025 10:48:56 -0300 Subject: [PATCH] SIENTIAPDE-1205 Update values.yaml and enhance logging in OPC activity - Change replicaCount from 5 to 1 for reduced resource allocation. - Update image tag in values.yaml to 0.4.5 for the latest version. - Modify GITHUB_BRANCH environment variable for improved async handling. - Add logging statements in OPC class to track server initialization and connection status. --- laborious/activities/opc.py | 7 ++++++- values.yaml | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/laborious/activities/opc.py b/laborious/activities/opc.py index 56610d1..019de79 100644 --- a/laborious/activities/opc.py +++ b/laborious/activities/opc.py @@ -29,6 +29,8 @@ class OPC(BaseActivity): self.opc_servers = opc_servers async def init_opc(self): + + self.logger.info("Initializing OPC servers...") for id, server in self.opc_servers.items(): self.opc_repository[id] = OpcRepository( id=server['id'], @@ -58,6 +60,9 @@ class OPC(BaseActivity): attachment_content=error_data.get( 'attachment_content', None) ) + else: + self.logger.info( + f"OPC server {id} connected successfully.") async def write_data(self, server_id: str, tag: str, data: Any, data_type: str, tag_type: str, metadata: dict[str, Any]) -> bool: @@ -193,7 +198,7 @@ class OPC(BaseActivity): success = success and local_success self.info( - f"Data written to OPC server {server_id}: {local_count} of {len(config['prediction_tags'])} prediction tags and {len(config['confidence_tags'])} confidence tags", metadata) + f"Process completed for OPC server {server_id}: {local_count} of {len(config['prediction_tags'])} prediction tags and {len(config['confidence_tags'])} confidence tags", metadata) return self.process_confidence(data, success, metadata) diff --git a/values.yaml b/values.yaml index 0a59346..0b5632e 100644 --- a/values.yaml +++ b/values.yaml @@ -3,7 +3,7 @@ # Declare variables to be passed into your templates. # This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ -replicaCount: 5 +replicaCount: 1 # This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ image: @@ -11,7 +11,7 @@ image: # This sets the pull policy for images. pullPolicy: Always # Overrides the image tag whose default is the chart appVersion. - tag: "0.4.4" + tag: "0.4.5" # This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ imagePullSecrets: @@ -151,7 +151,7 @@ env: - name: GITHUB_REPO_URL value: "git@github.com:Aignosi/sientia-dataops-laborious_temporal.git" - name: GITHUB_BRANCH - value: "SIENTIAPDE-1193-conferir-como-a-escrita-de-datetime-ocorre-no-temporal" + value: "SIENTIAPDE-1205-alterar-opc-para-assincrono" - name: PYTHON_APP value: "laborious.worker.worker"