Skip to content

Make camera startup nonblocking#48

Merged
lindestad merged 1 commit into
mainfrom
camera-status-startup
May 10, 2026
Merged

Make camera startup nonblocking#48
lindestad merged 1 commit into
mainfrom
camera-status-startup

Conversation

@lindestad
Copy link
Copy Markdown
Collaborator

@lindestad lindestad commented May 6, 2026

The main motivation for this is to drastically speed up startup of the app when no camera is connected (during development), taking it from >30 seconds to less than 1 on my laptop.

Moves the legacy Camera 1 webcam path onto the same status-driven pattern as the other camera receivers.

The app still starts the camera path by default, but opening and reconnecting the local camera now happens in a background receiver thread instead of during route import/startup. The video route streams the latest cached JPEG or a placeholder, and /api/camera/status reports connection state for diagnostics.

Validated with env UV_CACHE_DIR=/tmp/uv-cache uv run --frozen --group dev pytest, env UV_CACHE_DIR=/tmp/uv-cache uv run --frozen --group lint ruff check ., and git diff --check.

@lindestad lindestad marked this pull request as ready for review May 6, 2026 17:34
@lindestad lindestad requested review from Gutteerz and mringsby May 6, 2026 17:34
@lindestad lindestad merged commit df215bf into main May 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant