SIENTIAPDE-1148

refactor: update Temporal configuration keys in activities.py and temporal_manager.py for consistency and clarity
This commit is contained in:
vitor-aignosi
2025-07-11 10:44:26 -03:00
parent 7279192343
commit 31a1d5bf4e
3 changed files with 12 additions and 12 deletions

View File

@@ -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)

View File

@@ -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
)

View File

@@ -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')
}