Commit Graph
2 Commits
Author SHA1 Message Date
ki ccf90d3e46 fix(seed): prevent duplicate seeding under multi-worker gunicorn
CI / test (push) Has been cancelled
CI / docker (push) Has been cancelled
When the beta image runs with --workers > 1 (default: 2), every worker
calls lifespan() in parallel. Each worker sees an empty DB, then
seed_if_empty() runs concurrently, producing 2x (or Nx) demo entries.

Fix: wrap the seed operation in a process-wide FileLock. Even if a
worker loses the race it re-checks the table count inside the critical
section and returns without re-seeding.

Verified by cold-starting a 4-worker container: 8 items (was: 32).
2026-07-21 23:40:57 +02:00
ki 67f09363f3 Initial commit: WatchStack v0.1.0
- FastAPI + SQLite backend with REST API
- Polymorphic Media model (book + series)
- Cover lookup via Open Library
- Vanilla HTML/CSS/JS frontend (MAL-inspired)
- Dark theme, status tabs, drawer detail, stats modal
- 8 seed demo entries
2026-07-21 23:11:14 +02:00