SIENTIAPDE-1110

Implement store_data_package method in Redis activity for debug data storage. Update CoreScouter workflow to conditionally call store_data_package based on debug flag. Enhance tests for store_data_package functionality and error handling.
This commit is contained in:
vitor-aignosi
2025-07-07 10:03:08 -03:00
parent 08240efc8b
commit 0b77a7bc7e
4 changed files with 134 additions and 4 deletions

View File

@@ -74,7 +74,7 @@ class CoreScouter:
if held_data == {}:
return
async_export = workflow.execute_activity_method(
await workflow.execute_activity_method(
Activities.export_data_to_postgres,
{
**metadata,
@@ -86,4 +86,16 @@ class CoreScouter:
start_to_close_timeout=timedelta(seconds=60)
)
await async_export
if input_data.get('debug_data_package', False):
await workflow.execute_activity_method(
Activities.store_data_package,
{
**metadata,
'data': input_data['data'],
'held_data': held_data,
'workflow_name': input_data['workflow_name'],
'schedule_name': input_data['schedule_name']
},
retry_policy=retry_policy,
start_to_close_timeout=timedelta(seconds=60)
)