mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 09:02:15 +03:00
Implement start for review item description processor (#19352)
* Add review item data transmission * Publish review updates * Add review item subscriber * Basic implementation for testing review processor * Formatting
This commit is contained in:
committed by
Blake Blackshear
parent
fa1b88097b
commit
e9e3c481b2
@@ -0,0 +1,30 @@
|
||||
"""Facilitates communication between processes."""
|
||||
|
||||
import logging
|
||||
|
||||
from .zmq_proxy import Publisher, Subscriber
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ReviewDataPublisher(
|
||||
Publisher
|
||||
): # update when typing improvement is added 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 ReviewDataSubscriber(Subscriber):
|
||||
"""Receives review item data."""
|
||||
|
||||
topic_base = "review/"
|
||||
|
||||
def __init__(self, topic: str) -> None:
|
||||
super().__init__(topic)
|
||||
Reference in New Issue
Block a user