From 1dcba6b48e710a5774f5755032de7bf6725a1014 Mon Sep 17 00:00:00 2001 From: vitor-aignosi Date: Thu, 3 Jul 2025 14:04:10 -0300 Subject: [PATCH] SIENTIAPDE-1110 Refactor Scouter workflow to update data loading method, changing from load_latest_druid_data to load_latest_data. Adjusted parameters for consistency in collection naming and improved clarity in data retrieval process. --- scouter/workflow/scouter.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/scouter/workflow/scouter.py b/scouter/workflow/scouter.py index e9ca1f2..eedebc8 100644 --- a/scouter/workflow/scouter.py +++ b/scouter/workflow/scouter.py @@ -62,28 +62,28 @@ class Scouter: retry_policy=retry_policy ) - # data = await workflow.execute_local_activity_method( - # Activities.load_latest_data, - # { - # **metadata, - # 'collection_name': f"raw_{input_data['schedule_name']}", - # 'last_data_timestamp': last_data_timestamp - # }, - # start_to_close_timeout=timedelta(seconds=60), - # retry_policy=retry_policy - # ) - data = await workflow.execute_local_activity_method( - Activities.load_latest_druid_data, + Activities.load_latest_data, { **metadata, - 'schedule_name': input_data['schedule_name'], + 'collection_name': f"raw_{input_data['schedule_name']}", 'last_data_timestamp': last_data_timestamp }, start_to_close_timeout=timedelta(seconds=60), retry_policy=retry_policy ) + # data = await workflow.execute_local_activity_method( + # Activities.load_latest_druid_data, + # { + # **metadata, + # 'schedule_name': input_data['schedule_name'], + # 'last_data_timestamp': last_data_timestamp + # }, + # start_to_close_timeout=timedelta(seconds=60), + # retry_policy=retry_policy + # ) + await workflow.execute_activity_method( Activities.put_last_data_timestamp, {