mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-08-13 13:47:36 +02:00
Add review item data transmission
This commit is contained in:
parent
0a02c665fc
commit
874955a880
28
frigate/comms/review_updater.py
Normal file
28
frigate/comms/review_updater.py
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
"""Facilitates communication between processes."""
|
||||||
|
|
||||||
|
import logging
|
||||||
|
|
||||||
|
from .zmq_proxy import Publisher, Subscriber
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
class RecordingsDataPublisher(Publisher[tuple[str, float]]):
|
||||||
|
"""Publishes review item data."""
|
||||||
|
|
||||||
|
topic_base = "review/"
|
||||||
|
|
||||||
|
def __init__(self, topic: str) -> None:
|
||||||
|
super().__init__(topic)
|
||||||
|
|
||||||
|
def publish(self, payload: tuple[str, float], sub_topic: str = "") -> None:
|
||||||
|
super().publish(payload, sub_topic)
|
||||||
|
|
||||||
|
|
||||||
|
class RecordingsDataSubscriber(Subscriber):
|
||||||
|
"""Receives review item data."""
|
||||||
|
|
||||||
|
topic_base = "review/"
|
||||||
|
|
||||||
|
def __init__(self, topic: str) -> None:
|
||||||
|
super().__init__(topic)
|
Loading…
Reference in New Issue
Block a user