mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-01 02:57:41 +03:00
25 lines
752 B
Python
25 lines
752 B
Python
"""Run recording maintainer and cleanup."""
|
|
|
|
import logging
|
|
from multiprocessing.synchronize import Event as MpEvent
|
|
|
|
from frigate.config import FrigateConfig
|
|
from frigate.review.maintainer import ReviewSegmentMaintainer
|
|
from frigate.util.process import FrigateProcess
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
class ReviewProcess(FrigateProcess):
|
|
def __init__(self, config: FrigateConfig, stop_event: MpEvent) -> None:
|
|
super().__init__(stop_event, name="frigate.review_segment_manager", daemon=True)
|
|
self.config = config
|
|
|
|
def run(self) -> None:
|
|
self.pre_run_setup(self.config.logger)
|
|
maintainer = ReviewSegmentMaintainer(
|
|
self.config,
|
|
self.stop_event,
|
|
)
|
|
maintainer.start()
|