Refactor store dwell alert management API and dwell engine
- Updated argument parsing in manage_api.py to include new threshold parameters. - Enhanced _config_payload to include thresholds and webhook configurations. - Modified _build_summary to track queue metrics and adjust alert reporting. - Refactored DwellEngine to utilize queue thresholds for alerting and reporting. - Added queue metrics calculations and status change tracking in dwell_engine.py. - Updated notifier.py to support posting JSON events to webhooks. - Adjusted example configuration to reflect new threshold parameters. - Enhanced Docker entrypoint script for better process management. - Updated tests to cover new queue metrics and thresholds. - Improved ManagedServiceDetail and ManagedServices Vue components to display queue metrics.
This commit is contained in:
@@ -2,8 +2,9 @@ camera_id: store_cam_01
|
||||
timezone: Asia/Shanghai
|
||||
|
||||
thresholds:
|
||||
min_people: 5
|
||||
min_dwell_seconds: 600
|
||||
queue_time_threshold_seconds: 300
|
||||
crowded_count_threshold: 5
|
||||
normal_count_threshold: 2
|
||||
pause_timeout_seconds: 300
|
||||
alert_cooldown_seconds: 600
|
||||
|
||||
@@ -21,6 +22,7 @@ event_sink:
|
||||
path: logs/events.jsonl
|
||||
|
||||
webhook:
|
||||
url: ""
|
||||
alert_url: ""
|
||||
report_url: ""
|
||||
timeout_seconds: 5.0
|
||||
|
||||
Reference in New Issue
Block a user