mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 17:12:16 +03:00
Improve comms typing (#18599)
* Enable mypy for comms * Make zmq data types consistent * Cleanup inter process typing issues * Cleanup embeddings typing * Cleanup config updater * Cleanup recordings updator * Make publisher have a generic type * Cleanup event metadata updater * Cleanup event metadata updater * Cleanup detections updater * Cleanup websocket * Cleanup mqtt * Cleanup webpush * Cleanup dispatcher * Formatting * Remove unused * Add return type * Fix tests * Fix semantic triggers config typing * Cleanup
This commit is contained in:
committed by
Blake Blackshear
parent
1add72884a
commit
fcf3824124
@@ -79,7 +79,7 @@ class RecordingMaintainer(threading.Thread):
|
||||
self.config.cameras,
|
||||
[CameraConfigUpdateEnum.add, CameraConfigUpdateEnum.record],
|
||||
)
|
||||
self.detection_subscriber = DetectionSubscriber(DetectionTypeEnum.all)
|
||||
self.detection_subscriber = DetectionSubscriber(DetectionTypeEnum.all.value)
|
||||
self.recordings_publisher = RecordingsDataPublisher(
|
||||
RecordingsDataTypeEnum.recordings_available_through
|
||||
)
|
||||
@@ -545,7 +545,7 @@ class RecordingMaintainer(threading.Thread):
|
||||
if not topic:
|
||||
break
|
||||
|
||||
if topic == DetectionTypeEnum.video:
|
||||
if topic == DetectionTypeEnum.video.value:
|
||||
(
|
||||
camera,
|
||||
_,
|
||||
@@ -564,7 +564,7 @@ class RecordingMaintainer(threading.Thread):
|
||||
regions,
|
||||
)
|
||||
)
|
||||
elif topic == DetectionTypeEnum.audio:
|
||||
elif topic == DetectionTypeEnum.audio.value:
|
||||
(
|
||||
camera,
|
||||
frame_time,
|
||||
@@ -580,7 +580,9 @@ class RecordingMaintainer(threading.Thread):
|
||||
audio_detections,
|
||||
)
|
||||
)
|
||||
elif topic == DetectionTypeEnum.api or DetectionTypeEnum.lpr:
|
||||
elif (
|
||||
topic == DetectionTypeEnum.api.value or DetectionTypeEnum.lpr.value
|
||||
):
|
||||
continue
|
||||
|
||||
if frame_time < run_start - stale_frame_count_threshold:
|
||||
|
||||
Reference in New Issue
Block a user