Reduce dashboard CPU: cache DB, suppress logs, add systemd service
- Suppress Flask request logs (werkzeug ERROR only) - Cache SQLite connection with WAL + 8MB cache - Increase poll_ms 500->1000, history refresh 30s->60s - Show 'waiting for pipeline...' when /dev/shm empty - Add chicken-dashboard.service for systemd auto-start
This commit is contained in:
1 parent
9512fc7f4d
commit
dc447264b7
3 files changed
+58
-11
No files matched your search
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Chicken Counter Dashboard
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
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
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
Environment=PYTHONUNBUFFERED=1
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in new issue
Block a user