mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-20 13:42:47 +03:00
keep the previous region grid when the refresh request fails
The IPC reader now replies [] when a handler raises, and process_frames assigned that reply to region_grid unconditionally. The next region lookup then indexed into an empty list and killed the camera's detect process. An empty reply now keeps the current grid until the next daily refresh.
This commit is contained in:
@@ -338,7 +338,12 @@ def process_frames(
|
||||
continue
|
||||
|
||||
if datetime.now().astimezone(UTC) > next_region_update:
|
||||
region_grid = requestor.send_data(REQUEST_REGION_GRID, camera_config.name)
|
||||
updated_grid = requestor.send_data(REQUEST_REGION_GRID, camera_config.name)
|
||||
|
||||
# A failed request replies empty, so keep the current grid
|
||||
if updated_grid:
|
||||
region_grid = updated_grid
|
||||
|
||||
next_region_update = get_tomorrow_at_time(2)
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user