mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-10 10:33:11 +03:00
update_config stubs
This commit is contained in:
parent
e9f422ce09
commit
b53a47c666
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user