Spaces:
Running
Running
Update run_agentic_pipeline.py
Browse files- run_agentic_pipeline.py +7 -2
run_agentic_pipeline.py
CHANGED
@@ -44,7 +44,7 @@ except ImportError as e:
|
|
44 |
def extract_key_results_for_selection(okrs_dict): return [] # Placeholder
|
45 |
def format_single_okr_for_display(okr_data, **kwargs): return "Agentic modules not loaded. OKR display unavailable." # Placeholder
|
46 |
|
47 |
-
from services.report_data_handler import save_report_results
|
48 |
|
49 |
logger = logging.getLogger(__name__)
|
50 |
|
@@ -205,11 +205,16 @@ async def run_agentic_pipeline_autonomously(current_token_state_val, orchestrati
|
|
205 |
org_urn = current_token_state_val.get('org_urn')
|
206 |
|
207 |
try:
|
208 |
-
save_report_results(org_urn=org_urn, report_markdown=report_str, quarter=quarter, year=year, report_type='Quarter')
|
209 |
except Exception as e:
|
210 |
logging.error(f"error saving report {e}")
|
211 |
|
212 |
actionable_okrs = orchestration_output.get('actionable_okrs_and_tasks') # This is the dict containing 'okrs' list
|
|
|
|
|
|
|
|
|
|
|
213 |
krs_for_ui_selection_list = extract_key_results_for_selection(actionable_okrs) # Expects the dict
|
214 |
|
215 |
krs_for_selection_update = krs_for_ui_selection_list # Update state with list of KR dicts
|
|
|
44 |
def extract_key_results_for_selection(okrs_dict): return [] # Placeholder
|
45 |
def format_single_okr_for_display(okr_data, **kwargs): return "Agentic modules not loaded. OKR display unavailable." # Placeholder
|
46 |
|
47 |
+
from services.report_data_handler import save_report_results, save_actionable_okrs
|
48 |
|
49 |
logger = logging.getLogger(__name__)
|
50 |
|
|
|
205 |
org_urn = current_token_state_val.get('org_urn')
|
206 |
|
207 |
try:
|
208 |
+
report_id = save_report_results(org_urn=org_urn, report_markdown=report_str, quarter=quarter, year=year, report_type='Quarter')
|
209 |
except Exception as e:
|
210 |
logging.error(f"error saving report {e}")
|
211 |
|
212 |
actionable_okrs = orchestration_output.get('actionable_okrs_and_tasks') # This is the dict containing 'okrs' list
|
213 |
+
try:
|
214 |
+
save_actionable_okrs(org_urn, actionable_okrs, report_id)
|
215 |
+
except Exception as e:
|
216 |
+
logging.error(f"error saving report {e}")
|
217 |
+
|
218 |
krs_for_ui_selection_list = extract_key_results_for_selection(actionable_okrs) # Expects the dict
|
219 |
|
220 |
krs_for_selection_update = krs_for_ui_selection_list # Update state with list of KR dicts
|