hm_ai_qc_report_tool/.gitignore
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

68 lines
689 B
Text

# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
venv/
env/
ENV/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
# Flask
instance/
.webassets-cache
# Environment
.env
.env.local
# Box credentials
config/box_config.json
# IDEs
.vscode/
.idea/
*.swp
*.swo
*~
# OS
.DS_Store
Thumbs.db
# Logs
*.log
logs/
# Database
database/*.db
database/*.db-journal
# Uploads and Storage
uploads/
storage/reports/
storage/cache/
# Reference files (test data, results, cheat sheets)
reference/
# Supporting data (censorship training images)
data/supporting/censorship_trainset/
# Temporary/working directories
tmp/