Fix dashboard freeze: waitress, reduce frame refresh, atomic reads

- Switch Flask dev server -> waitress (8 threads, production WSGI)
- Only refresh frame.jpg when frame_index changes, not every second
- Safety try/except on send_file for edge-case file conflicts
- Fix test_run.sh: export PYTHONPATH, use venv python
- Update service file to use venv python
This commit is contained in:
proitlab committed 2026-07-22 16:14:03 +07:00
1 parent b9f4ba2ef8
commit 6cddf2c9d3
4 files changed
+16 -9

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@ After=network.target
Type=simple
User=dsutanto
WorkingDirectory=/media/jetson/DATA/.Codes/chicken-counting-sukawarna-det
ExecStart=/usr/bin/python3 dashboard.py --port 8080 --db chicken_counts.db
ExecStart=/media/jetson/DATA/karung-sukawarna/venv/bin/python dashboard.py --port 8080 --db chicken_counts.db
Restart=always
RestartSec=5
Environment=PYTHONUNBUFFERED=1