diff --git a/applications/modelling_e2e/local_handler/invoke_local_lambda.py b/applications/modelling_e2e/local_handler/invoke_local_lambda.py index 9ed2fc02..991d181d 100644 --- a/applications/modelling_e2e/local_handler/invoke_local_lambda.py +++ b/applications/modelling_e2e/local_handler/invoke_local_lambda.py @@ -15,7 +15,7 @@ payload = { "property_ids": [727220, 727229], "portfolio_id": 796, "scenario_id": 1268, - "no_solar": False, + "refetch_solar": True, "dry_run": True, } ) diff --git a/scripts/trigger_modelling_e2e_sqs.py b/scripts/trigger_modelling_e2e_sqs.py index e4b0dd4f..665dd18c 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 → Lambda re-uses stored lodged EPCs instead of calling the EPC API +# (falls back to live API call when no stored EPC exists for a property). +REFETCH_EPC: bool = True + +# False → Lambda re-uses stored predicted EPCs instead of re-running prediction +# (falls back to live prediction when no stored predicted EPC exists). +REPREDICT_EPC: bool = True # --------------------------------------------------------------------------- _REPO_ROOT = Path(__file__).resolve().parents[1] @@ -150,7 +158,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: @@ -161,7 +170,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, } ),