mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-11-12 00:23:01 +03:00
Refactor recordings retention to be based on review items (#13355)
* Refactor recordings config to be based off of review items * Update object processing logic for when an event is created * Migrate to deciding recording retention based on review items * Refactor recording expiration to be based off of review items * Remove remainder of recording events access * Handle migration automatically * Update version and cleanup * Update docs * Clarify docs * Cleanup * Target camera config * Safely access all fields
This commit is contained in:
@@ -11,7 +11,7 @@ from playhouse.sqliteq import SqliteQueueDatabase
|
||||
from setproctitle import setproctitle
|
||||
|
||||
from frigate.config import FrigateConfig
|
||||
from frigate.models import Event, Recordings
|
||||
from frigate.models import Recordings, ReviewSegment
|
||||
from frigate.record.maintainer import RecordingMaintainer
|
||||
from frigate.util.services import listen
|
||||
|
||||
@@ -41,7 +41,7 @@ def manage_recordings(config: FrigateConfig) -> None:
|
||||
},
|
||||
timeout=max(60, 10 * len([c for c in config.cameras.values() if c.enabled])),
|
||||
)
|
||||
models = [Event, Recordings]
|
||||
models = [ReviewSegment, Recordings]
|
||||
db.bind(models)
|
||||
|
||||
maintainer = RecordingMaintainer(
|
||||
|
||||
Reference in New Issue
Block a user