Skip to content

feat(rtstream): direct alerts on a stream - #132

Merged
lalit-videodb merged 3 commits into
release-0-5-5from
lalit/rtstream-direct-alerts
Dec 1, 2026
Merged

lalit-videodb merged 3 commits into
release-0-5-5from
lalit/rtstream-direct-alerts

Conversation

@lalit-videodb

@lalit-videodb lalit-videodb commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Adds stream-level direct alerts to RTStream: create_alert, list_alerts, get_alert, enable_alert and disable_alert.

A direct alert watches a stream for one event and needs no understanding or index. The backend has been live in production since 12 November (/rtstream/{id}/alert). Index alerts on RTStreamSceneIndex and RTStreamIndex are unchanged.

  • create_alert(event_id, callback_url, ws_connection_id=None, segmentation=None, sampling=None, threshold=50, cooldown_seconds=30, profile="standard") returns the alert id. Server limits: window 2–60 s, frame_count 1–5, threshold 0–100.
  • get_alert returns status, runtime_status and health (last_evaluated_at, last_error, coverage).
  • README example added.

Testing:

  • pytest tests passes (32), including tests/test_rtstream_alerts.py.
  • Against dev, installed from this branch, on a stopped stream: create → get (enabled, waiting_for_stream, health zero counts) → disable → enable → disable → list. All as expected.
  • Dev E2E on a live stream passed 21/21 on 11 November with this code.

Node counterpart: video-db/videodb-node #100.

create_alert, list_alerts, get_alert, enable_alert and disable_alert on RTStream.
A direct alert checks one event on the stream's frames, with no index.
@lalit-videodb lalit-videodb mentioned this pull request Dec 1, 2026
@lalit-videodb
lalit-videodb merged commit db3747a into release-0-5-5 Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant