Compare commits

..

No commits in common. "c22de09518a9e52baa88ed75373766d0253a3890" and "b0f4fcd6767a8ba7f4eac3282322c6d656fe0c13" have entirely different histories.

2 changed files with 7 additions and 8 deletions

View File

@ -201,10 +201,9 @@ Each line represents a detection state, not necessarily unique individuals. The
except json.JSONDecodeError as je: except json.JSONDecodeError as je:
logger.error("Failed to parse review description JSON: %s", je) logger.error("Failed to parse review description JSON: %s", je)
return None return None
# observations and confidence are required on the model; fill an empty default # observations is required on the model; fill an empty default
# if the response omitted it so attribute access stays safe. # if the response omitted it so attribute access stays safe.
raw.setdefault("observations", []) raw.setdefault("observations", [])
raw.setdefault("confidence", 0.0)
metadata = ReviewMetadata.model_construct(**raw) metadata = ReviewMetadata.model_construct(**raw)
except Exception as e: except Exception as e:
logger.error( logger.error(

View File

@ -317,16 +317,16 @@ class CameraWatchdog(threading.Thread):
if camera != self.config.name: if camera != self.config.name:
continue continue
if topic.endswith(RecordingsDataTypeEnum.invalid.value): if topic.endswith(RecordingsDataTypeEnum.valid.value):
self.logger.warning(
f"Invalid recording segment detected for {camera} at {segment_time}"
)
self.latest_invalid_segment_time = segment_time
elif topic.endswith(RecordingsDataTypeEnum.valid.value):
self.logger.debug( self.logger.debug(
f"Latest valid recording segment time on {camera}: {segment_time}" f"Latest valid recording segment time on {camera}: {segment_time}"
) )
self.latest_valid_segment_time = segment_time self.latest_valid_segment_time = segment_time
elif topic.endswith(RecordingsDataTypeEnum.invalid.value):
self.logger.warning(
f"Invalid recording segment detected for {camera} at {segment_time}"
)
self.latest_invalid_segment_time = segment_time
elif topic.endswith(RecordingsDataTypeEnum.latest.value): elif topic.endswith(RecordingsDataTypeEnum.latest.value):
if segment_time is not None: if segment_time is not None:
self.latest_cache_segment_time = segment_time self.latest_cache_segment_time = segment_time