mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Update trigger script and local invoker to use refetch_solar, refetch_epc, repredict_epc 🟩
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
100a580119
commit
5c3bde0cf5
2 changed files with 18 additions and 7 deletions
|
|
@ -15,7 +15,7 @@ payload = {
|
|||
"property_ids": [727220, 727229],
|
||||
"portfolio_id": 796,
|
||||
"scenario_id": 1268,
|
||||
"no_solar": False,
|
||||
"refetch_solar": True,
|
||||
"dry_run": True,
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
}
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue