forked from Rockachopa/Timmy-time-dashboard
feat: upgrade to qwen3.5, self-hosted Gitea CI, optimize Docker image
Model upgrade: - qwen2.5:14b → qwen3.5:latest across config, tools, and docs - Added qwen3.5 to multimodal model registry Self-hosted Gitea CI: - .gitea/workflows/tests.yml: lint + test jobs via act_runner - Unified Dockerfile: pre-baked deps from poetry.lock for fast CI - sitepackages=true in tox for ~2s dep resolution (was ~40s) - OLLAMA_URL set to dead port in CI to prevent real LLM calls Test isolation fixes: - Smoke test fixture mocks create_timmy (was hitting real Ollama) - WebSocket sends initial_state before joining broadcast pool (race fix) - Tests use settings.ollama_model/url instead of hardcoded values - skip_ci marker for Ollama-dependent tests, excluded in CI tox envs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -36,9 +36,15 @@ class WebSocketManager:
|
||||
self._connections: list[WebSocket] = []
|
||||
self._event_history: collections.deque[WSEvent] = collections.deque(maxlen=100)
|
||||
|
||||
async def connect(self, websocket: WebSocket) -> None:
|
||||
"""Accept a new WebSocket connection."""
|
||||
await websocket.accept()
|
||||
async def connect(self, websocket: WebSocket, *, accept: bool = True) -> None:
|
||||
"""Accept a new WebSocket connection and add it to the broadcast pool.
|
||||
|
||||
Args:
|
||||
websocket: The WebSocket to register.
|
||||
accept: If False, skip the accept() call (caller already accepted).
|
||||
"""
|
||||
if accept:
|
||||
await websocket.accept()
|
||||
self._connections.append(websocket)
|
||||
logger.info(
|
||||
"WebSocket connected — %d active connections",
|
||||
|
||||
Reference in New Issue
Block a user