From 31a1d5bf4ea0b83158934d4a26145ce40b2edc49 Mon Sep 17 00:00:00 2001 From: vitor-aignosi Date: Fri, 11 Jul 2025 10:44:26 -0300 Subject: [PATCH] SIENTIAPDE-1148 refactor: update Temporal configuration keys in activities.py and temporal_manager.py for consistency and clarity --- orchestrator/activities/activities.py | 10 +++++----- orchestrator/activities/temporal_manager.py | 6 +++--- orchestrator/utils/connectors_config.py | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/orchestrator/activities/activities.py b/orchestrator/activities/activities.py index 5b0ded5..97851cb 100644 --- a/orchestrator/activities/activities.py +++ b/orchestrator/activities/activities.py @@ -32,9 +32,9 @@ class Activities( # Couchbase, # notification_handler=notification_handler) TemporalManager.__init__(self, - host=temporal_config['host'], - scouter_namespace=temporal_config['scouter_namespace'], - laborious_namespace=temporal_config['laborious_namespace'], + host=temporal_config['temporal_host'], + scouter_namespace=temporal_config['temporal_scouter_namespace'], + laborious_namespace=temporal_config['temporal_laborious_namespace'], logger=logger, notification_handler=notification_handler) @@ -47,8 +47,8 @@ class Activities( # Couchbase, notification_handler=notification_handler) Formatters.__init__(self, - scouter_namespace=temporal_config['scouter_namespace'], - laborious_namespace=temporal_config['laborious_namespace'], + scouter_namespace=temporal_config['temporal_scouter_namespace'], + laborious_namespace=temporal_config['temporal_laborious_namespace'], logger=logger, notification_handler=notification_handler) diff --git a/orchestrator/activities/temporal_manager.py b/orchestrator/activities/temporal_manager.py index d4caf19..d3c5175 100644 --- a/orchestrator/activities/temporal_manager.py +++ b/orchestrator/activities/temporal_manager.py @@ -20,7 +20,7 @@ class TemporalManager(BaseActivity): def __init__(self, host: str, scouter_namespace: str, laborious_namespace: str, logger: Logger, notification_handler: NotificationHandler): - self.host = host + self.temporal_host = host self.scouter_namespace = scouter_namespace self.laborious_namespace = laborious_namespace self.temporal_clients = {} @@ -45,14 +45,14 @@ class TemporalManager(BaseActivity): self.logger.info(f"Scouter namespace: {self.scouter_namespace}") scouter_client = await Client.connect( - target_host=self.host, + target_host=self.temporal_host, namespace=self.scouter_namespace ) self.logger.info(f"Laborious namespace: {self.laborious_namespace}") laborious_client = await Client.connect( - target_host=self.host, + target_host=self.temporal_host, namespace=self.laborious_namespace ) diff --git a/orchestrator/utils/connectors_config.py b/orchestrator/utils/connectors_config.py index fe8225a..3b7551a 100644 --- a/orchestrator/utils/connectors_config.py +++ b/orchestrator/utils/connectors_config.py @@ -32,8 +32,8 @@ def build_couchbase_config(): def build_temporal_config(): return { - 'host': getenv('TEMPORAL_HOST', 'localhost:7233'), - 'namespace': getenv('TEMPORAL_NAMESPACE', 'default'), - 'scouter_namespace': getenv('TEMPORAL_SCOUTER_NAMESPACE', 'scouter'), - 'laborious_namespace': getenv('TEMPORAL_LABORIOUS_NAMESPACE', 'laborious') + 'temporal_host': getenv('TEMPORAL_HOST', 'localhost:7233'), + 'temporal_namespace': getenv('TEMPORAL_NAMESPACE', 'default'), + 'temporal_scouter_namespace': getenv('TEMPORAL_SCOUTER_NAMESPACE', 'scouter'), + 'temporal_laborious_namespace': getenv('TEMPORAL_LABORIOUS_NAMESPACE', 'laborious') }