hm_ai_qc_report_tool/modules/reporting
nickviljoen 6a2945275a Reporting: filesystem-back the search-result cache
The previous in-memory dict only worked with a single gunicorn worker.
With workers=2 in gunicorn_config.py, the async-search worker stored
the result in its own process memory while the dashboard request
landed on the other worker ~50% of the time — cache miss → fell
through to a synchronous Box fetch → exceeded the GCP load
balancer's 30s timeout, returning "stream timeout" to the user even
though the search itself succeeded.

Now stores cache entries as pickled files at storage/cache/<key>.pkl,
shared across workers via the existing volume mount. Atomic writes
via tempfile + os.replace. TTL still 30 minutes. Public API
(cache_set/get/delete/cleanup) is unchanged so call sites in
reporting/routes.py continue to work.
2026-05-09 17:46:42 +02:00
..
templates/reporting Fix report download: use url_for() instead of hardcoded paths 2026-04-15 12:53:22 +02:00
__init__.py Add modular architecture, core framework, and web UI 2026-02-25 11:39:04 +02:00
aggregator.py v2.2.0: Gemini video, batch grouping, thumbnails, speed, price fix, printer check 2026-04-16 13:56:07 +02:00
blueprint.py Add modular architecture, core framework, and web UI 2026-02-25 11:39:04 +02:00
result_cache.py Reporting: filesystem-back the search-result cache 2026-05-09 17:46:42 +02:00
routes.py Reporting: show all jobs in Previous Box Reports 2026-05-01 15:15:58 +02:00