Compare commits

..

3 Commits

Author SHA1 Message Date
Josh Hawkins
67845d647f
Merge 441d57c76b into 097673b845 2025-11-14 16:11:44 +00:00
Josh Hawkins
441d57c76b ensure logging config is passed to camera capture and tracker processes 2025-11-14 10:11:39 -06:00
GuoQing Liu
097673b845
chore: i18n use cache key (#20885)
Some checks failed
CI / AMD64 Build (push) Has been cancelled
CI / ARM Build (push) Has been cancelled
CI / Jetson Jetpack 6 (push) Has been cancelled
CI / AMD64 Extra Build (push) Has been cancelled
CI / ARM Extra Build (push) Has been cancelled
CI / Synaptics Build (push) Has been cancelled
CI / Assemble and push default build (push) Has been cancelled
* chore: i18n use cache key

* Fix indentation in Dockerfile for pip command

* Add build argument for GIT_COMMIT_HASH in CI workflow

* Add short-sha output to action.yml

* Update build args to use short SHA output

* build: use vite .env

* Remove unnecessary newline in Dockerfile

* Define proxy host variable in vite.config.ts

Add a new line to define the proxy host variable.
2025-11-14 09:36:46 -06:00
6 changed files with 17 additions and 5 deletions

1
.gitignore vendored
View File

@ -15,6 +15,7 @@ frigate/version.py
web/build web/build
web/node_modules web/node_modules
web/coverage web/coverage
web/.env
core core
!/web/**/*.ts !/web/**/*.ts
.idea/* .idea/*

View File

@ -14,6 +14,7 @@ push-boards: $(BOARDS:%=push-%)
version: version:
echo 'VERSION = "$(VERSION)-$(COMMIT_HASH)"' > frigate/version.py echo 'VERSION = "$(VERSION)-$(COMMIT_HASH)"' > frigate/version.py
echo 'VITE_GIT_COMMIT_HASH=$(COMMIT_HASH)' > web/.env
local: version local: version
docker buildx build --target=frigate --file docker/main/Dockerfile . \ docker buildx build --target=frigate --file docker/main/Dockerfile . \

View File

@ -136,6 +136,7 @@ class CameraMaintainer(threading.Thread):
self.ptz_metrics[name], self.ptz_metrics[name],
self.region_grids[name], self.region_grids[name],
self.stop_event, self.stop_event,
self.config.logger,
) )
self.camera_processes[config.name] = camera_process self.camera_processes[config.name] = camera_process
camera_process.start() camera_process.start()
@ -156,7 +157,11 @@ class CameraMaintainer(threading.Thread):
self.frame_manager.create(f"{config.name}_frame{i}", frame_size) self.frame_manager.create(f"{config.name}_frame{i}", frame_size)
capture_process = CameraCapture( capture_process = CameraCapture(
config, count, self.camera_metrics[name], self.stop_event config,
count,
self.camera_metrics[name],
self.stop_event,
self.config.logger,
) )
capture_process.daemon = True capture_process.daemon = True
self.capture_processes[name] = capture_process self.capture_processes[name] = capture_process

View File

@ -16,7 +16,7 @@ from frigate.comms.recordings_updater import (
RecordingsDataSubscriber, RecordingsDataSubscriber,
RecordingsDataTypeEnum, RecordingsDataTypeEnum,
) )
from frigate.config import CameraConfig, DetectConfig, ModelConfig from frigate.config import CameraConfig, DetectConfig, LoggerConfig, ModelConfig
from frigate.config.camera.camera import CameraTypeEnum from frigate.config.camera.camera import CameraTypeEnum
from frigate.config.camera.updater import ( from frigate.config.camera.updater import (
CameraConfigUpdateEnum, CameraConfigUpdateEnum,
@ -539,6 +539,7 @@ class CameraCapture(FrigateProcess):
shm_frame_count: int, shm_frame_count: int,
camera_metrics: CameraMetrics, camera_metrics: CameraMetrics,
stop_event: MpEvent, stop_event: MpEvent,
log_config: LoggerConfig | None = None,
) -> None: ) -> None:
super().__init__( super().__init__(
stop_event, stop_event,
@ -549,9 +550,10 @@ class CameraCapture(FrigateProcess):
self.config = config self.config = config
self.shm_frame_count = shm_frame_count self.shm_frame_count = shm_frame_count
self.camera_metrics = camera_metrics self.camera_metrics = camera_metrics
self.log_config = log_config
def run(self) -> None: def run(self) -> None:
self.pre_run_setup() self.pre_run_setup(self.log_config)
camera_watchdog = CameraWatchdog( camera_watchdog = CameraWatchdog(
self.config, self.config,
self.shm_frame_count, self.shm_frame_count,
@ -577,6 +579,7 @@ class CameraTracker(FrigateProcess):
ptz_metrics: PTZMetrics, ptz_metrics: PTZMetrics,
region_grid: list[list[dict[str, Any]]], region_grid: list[list[dict[str, Any]]],
stop_event: MpEvent, stop_event: MpEvent,
log_config: LoggerConfig | None = None,
) -> None: ) -> None:
super().__init__( super().__init__(
stop_event, stop_event,
@ -592,9 +595,10 @@ class CameraTracker(FrigateProcess):
self.camera_metrics = camera_metrics self.camera_metrics = camera_metrics
self.ptz_metrics = ptz_metrics self.ptz_metrics = ptz_metrics
self.region_grid = region_grid self.region_grid = region_grid
self.log_config = log_config
def run(self) -> None: def run(self) -> None:
self.pre_run_setup() self.pre_run_setup(self.log_config)
frame_queue = self.camera_metrics.frame_queue frame_queue = self.camera_metrics.frame_queue
frame_shape = self.config.frame_shape frame_shape = self.config.frame_shape

1
web/.gitignore vendored
View File

@ -22,3 +22,4 @@ dist-ssr
*.njsproj *.njsproj
*.sln *.sln
*.sw? *.sw?
.env

View File

@ -33,7 +33,7 @@ i18n
fallbackLng: "en", // use en if detected lng is not available fallbackLng: "en", // use en if detected lng is not available
backend: { backend: {
loadPath: "locales/{{lng}}/{{ns}}.json", loadPath: `locales/{{lng}}/{{ns}}.json?v=${import.meta.env.VITE_GIT_COMMIT_HASH || "unknown"}`,
}, },
ns: [ ns: [