Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion services/tracking/cross_camera_reid.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,13 @@ def _fetch_candidates(
"""Return all live embedding records that belong to other cameras."""
pattern = "embed:*"
# KEYS is fine for small deployments; use SCAN for production scale
all_keys: list[bytes] = self._r.keys(pattern)
all_keys = []
cursor = 0
while True:
cursor, batch = self._r.scan(cursor, match=pattern, count=100)
all_keys.extend(batch)
if cursor == 0:
break
records: list[EmbeddingRecord] = []

for raw_key in all_keys:
Expand Down
Loading