From b53a47c666b62a674928f6b02e22321b65ec3690 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Sat, 7 Mar 2026 16:54:10 -0600 Subject: [PATCH] update_config stubs --- frigate/data_processing/post/api.py | 16 ++++++++++++++++ frigate/data_processing/real_time/api.py | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/frigate/data_processing/post/api.py b/frigate/data_processing/post/api.py index c341bd8ef..89e179dc6 100644 --- a/frigate/data_processing/post/api.py +++ b/frigate/data_processing/post/api.py @@ -5,6 +5,7 @@ from abc import ABC, abstractmethod from typing import Any from frigate.config import FrigateConfig +from frigate.config.enrichment_updater import EnrichmentConfigEnum from ..types import DataProcessorMetrics, DataProcessorModelRunner, PostProcessDataEnum @@ -50,3 +51,18 @@ class PostProcessorApi(ABC): None if request was not handled, otherwise return response. """ pass + + def update_config( + self, update_type: EnrichmentConfigEnum, payload: Any + ) -> None: + """Handle a config change notification. + + Called for every config update published under ``config/``. + Processors should override this to check the update type and act + only on changes relevant to them. Default is a no-op. + + Args: + update_type: The enrichment config type that changed. + payload: The updated configuration object. + """ + pass diff --git a/frigate/data_processing/real_time/api.py b/frigate/data_processing/real_time/api.py index 0fa0f9952..11158b0a9 100644 --- a/frigate/data_processing/real_time/api.py +++ b/frigate/data_processing/real_time/api.py @@ -7,6 +7,7 @@ from typing import Any import numpy as np from frigate.config import FrigateConfig +from frigate.config.enrichment_updater import EnrichmentConfigEnum from ..types import DataProcessorMetrics @@ -61,3 +62,18 @@ class RealTimeProcessorApi(ABC): None. """ pass + + def update_config( + self, update_type: EnrichmentConfigEnum, payload: Any + ) -> None: + """Handle a config change notification. + + Called for every config update published under ``config/``. + Processors should override this to check the update type and act + only on changes relevant to them. Default is a no-op. + + Args: + update_type: The enrichment config type that changed. + payload: The updated configuration object. + """ + pass