Split config.py into multiple files (#14038)

* Replace logging.warn with logging.warning

* Install config global state early

* Split config.py into more manageable pieces
This commit is contained in:
gtsiam
2024-09-28 14:21:42 -05:00
committed by GitHub
parent 576191cd4e
commit bbbb3b4a06
39 changed files with 2240 additions and 1892 deletions
+24
View File
@@ -0,0 +1,24 @@
from pydantic import Field
from .base import FrigateBaseModel
__all__ = ["TelemetryConfig", "StatsConfig"]
class StatsConfig(FrigateBaseModel):
amd_gpu_stats: bool = Field(default=True, title="Enable AMD GPU stats.")
intel_gpu_stats: bool = Field(default=True, title="Enable Intel GPU stats.")
network_bandwidth: bool = Field(
default=False, title="Enable network bandwidth for ffmpeg processes."
)
class TelemetryConfig(FrigateBaseModel):
network_interfaces: list[str] = Field(
default=[],
title="Enabled network interfaces for bandwidth calculation.",
)
stats: StatsConfig = Field(
default_factory=StatsConfig, title="System Stats Configuration"
)
version_check: bool = Field(default=True, title="Enable latest version check.")