fix(dashboard): clean up stale position cache on unmatched close events

_handle_close was not clearing _current_positions when no matching OPEN
trade was found in DB, causing all subsequent entries for the same
symbol+direction to be silently skipped. Also add PYTHONUNBUFFERED=1
and python -u to make log parser crashes visible in docker logs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
21in7
2026-03-18 10:10:15 +09:00
parent 652990082d
commit 4792b0f9cf
3 changed files with 3 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ services:
restart: unless-stopped
environment:
- TZ=Asia/Seoul
- PYTHONUNBUFFERED=1
- LOG_DIR=/app/logs
- DB_PATH=/app/data/dashboard.db
- POLL_INTERVAL=5