phase 6
This commit is contained in:
@@ -35,6 +35,25 @@ def stats(job_id: str | None, **kwargs) -> None:
|
||||
push_detect_event(job_id, "stats_update", dataclasses.asdict(s))
|
||||
|
||||
|
||||
def frame_update(
|
||||
job_id: str | None,
|
||||
frame_ref: int,
|
||||
timestamp: float,
|
||||
jpeg_b64: str,
|
||||
boxes: list[dict],
|
||||
) -> None:
|
||||
"""Emit a frame_update event with the image and bounding boxes."""
|
||||
if not job_id:
|
||||
return
|
||||
payload = {
|
||||
"frame_ref": frame_ref,
|
||||
"timestamp": timestamp,
|
||||
"jpeg_b64": jpeg_b64,
|
||||
"boxes": boxes,
|
||||
}
|
||||
push_detect_event(job_id, "frame_update", payload)
|
||||
|
||||
|
||||
def graph_update(job_id: str | None, nodes: list[dict]) -> None:
|
||||
"""Emit a graph_update event with node states."""
|
||||
if not job_id:
|
||||
|
||||
Reference in New Issue
Block a user