From 513e4a0de888ae2d612e7c00603adb04e16a9709 Mon Sep 17 00:00:00 2001 From: vitor-aignosi Date: Wed, 16 Jul 2025 15:36:33 -0300 Subject: [PATCH] SIENTIAPDE-1163 refactor: update Temporal client initialization to use environment variable for namespace, improving configuration flexibility --- orchestrator/worker/worker.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/orchestrator/worker/worker.py b/orchestrator/worker/worker.py index 8193791..f7c37d4 100644 --- a/orchestrator/worker/worker.py +++ b/orchestrator/worker/worker.py @@ -20,6 +20,7 @@ with workflow.unsafe.imports_passed_through(): async def main(): host = os.getenv('TEMPORAL_HOST', 'localhost:7233') + namespace = os.getenv('TEMPORAL_NAMESPACE', 'default') logger = get_logger(__name__) logger.info('Starting Worker...') @@ -34,11 +35,11 @@ async def main(): project_name=os.getenv('PROJECT_NAME', 'orchestrator'), ) - logger.info('Starting Temporal Client...') + logger.info(f'Starting Temporal Client at {host}:{namespace}') temporal_client = await client.Client.connect( target_host=host, - namespace=os.getenv('TEMPORAL_NAMESPACE', 'default') + namespace=namespace ) logger.info('Starting Activities...')