Model/applications/modelling_e2e
Jun-te Kim de5e9a2362 perf(modelling_e2e): bulk reads and batch writes to cut RDS load
The handler fired ~2+2N read round-trips and N+N write transactions per
SQS batch, pinning RDS CPU under ~32 concurrent containers on pool_size=1.

Reads: merge the duplicate property query and add overrides_for_many /
SolarRepository.get_many so overrides, solar, and property rows each load
in one query (2+2N -> 3).

Writes: buffer each modelled property's persistence intent in memory
(_PropertyWrite) during the loop, then flush the whole batch in one
PostgresUnitOfWork with a single commit, and run the baseline orchestrator
once for all written ids (N+N -> 2 transactions). Per-property modelling
failures stay isolated in the loop; the batch write is all-or-nothing and
retried via SQS (saves are idempotent upserts).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 18:43:42 +00:00
..
local_handler remove smoke tests from gh workflows 2026-06-24 11:35:30 +00:00
Dockerfile move handler stuff to applications directory 2026-06-22 13:35:23 +00:00
errors.py Fail unmodellable properties with a specific, debuggable error 🟥 2026-06-24 14:10:55 +00:00
handler.py perf(modelling_e2e): bulk reads and batch writes to cut RDS load 2026-06-24 18:43:42 +00:00
modelling_e2e_trigger_body.py process multiple properties in one message 2026-06-22 15:46:18 +00:00
requirements.txt various fixes 2026-06-22 14:21:52 +00:00