From f811b39fa1d3026ca547e35cba676bb718ad7b0a Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Fri, 26 Jun 2026 11:26:28 +0000 Subject: [PATCH] correct previous comits --- scripts/trigger_modelling_e2e_sqs.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/scripts/trigger_modelling_e2e_sqs.py b/scripts/trigger_modelling_e2e_sqs.py index 521359c4..0733a941 100644 --- a/scripts/trigger_modelling_e2e_sqs.py +++ b/scripts/trigger_modelling_e2e_sqs.py @@ -23,8 +23,8 @@ from utilities.logger import setup_logger # --------------------------------------------------------------------------- # CONFIG — edit these before running # --------------------------------------------------------------------------- -PORTFOLIO_ID: int = 805 -SCENARIO_ID: int = 1267 +PORTFOLIO_ID: int = 796 +SCENARIO_ID: int = 1268 SQS_QUEUE_NAME: str = "modelling_e2e-queue-dev" # Max number of properties to process this run (cost cap). @@ -42,8 +42,16 @@ COMPLETED_SINCE: datetime | None = datetime( # True → Lambda runs the full pipeline but skips all DB writes (safe for testing). DRY_RUN: bool = False -# True → Lambda skips the Google Solar fetch. -NO_SOLAR: bool = False +# False → Lambda skips the Google Solar fetch (re-uses stored Solar data). +REFETCH_SOLAR: bool = True + +# False → use stored lodged EPC for properties that have one; properties with no +# stored lodged EPC are treated as EPC-less and routed to prediction (no API call). +REFETCH_EPC: bool = True + +# False → use stored predicted EPC for EPC-less properties that have one; live +# prediction still runs when no stored predicted EPC exists for the property. +REPREDICT_EPC: bool = True # --------------------------------------------------------------------------- _REPO_ROOT = Path(__file__).resolve().parents[1] @@ -151,7 +159,8 @@ def main() -> None: logger.info( f"sending {len(batches)} messages " f"(portfolio={PORTFOLIO_ID}, scenario={SCENARIO_ID}, " - f"dry_run={DRY_RUN}, no_solar={NO_SOLAR}) → {sqs_url}" + f"dry_run={DRY_RUN}, refetch_solar={REFETCH_SOLAR}, " + f"refetch_epc={REFETCH_EPC}, repredict_epc={REPREDICT_EPC}) → {sqs_url}" ) for batch in batches: @@ -162,7 +171,9 @@ def main() -> None: "property_ids": batch, "portfolio_id": PORTFOLIO_ID, "scenario_id": SCENARIO_ID, - "no_solar": NO_SOLAR, + "refetch_solar": REFETCH_SOLAR, + "refetch_epc": REFETCH_EPC, + "repredict_epc": REPREDICT_EPC, "dry_run": DRY_RUN, } ),