update_config stubs

This commit is contained in:
Josh Hawkins 2026-03-07 16:54:10 -06:00
parent e9f422ce09
commit b53a47c666
2 changed files with 32 additions and 0 deletions

View File

@ -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

View File

@ -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