go2rtc: auto-reconcile streams so live/recording self-heal
Live and recording both read from the go2rtc restream. If go2rtc's runtime stream table gets emptied (camera clear via API, go2rtc restart with a stale/empty config, or a silently-failed startup sync_all), every restream returns 404 and both live and recording go dark until a manual `docker restart nvr-go2rtc`. Add a background Reconciler that every 30s diffs the desired streams against go2rtc /api/streams and PUTs only the missing ones (existing streams are left untouched so active producers/consumers are not disrupted). VERSION -> 0.0.115. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,7 @@ if TYPE_CHECKING:
|
||||
from .recorder.indexer import Indexer
|
||||
from .recorder.supervisor import Supervisor
|
||||
from .services.retention import Retention
|
||||
from .services.go2rtc import Reconciler
|
||||
from .api.ws import ConnectionManager
|
||||
|
||||
|
||||
@@ -18,6 +19,7 @@ class Runtime:
|
||||
supervisor: "Supervisor"
|
||||
indexer: "Indexer"
|
||||
retention: "Retention"
|
||||
reconciler: "Reconciler"
|
||||
ws: "ConnectionManager"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user