Skip to content

Commit

Permalink
Remove the search fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
lalinsky committed Feb 24, 2024
1 parent 39089ad commit 6b716ac
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions acoustid/data/fingerprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,23 +264,10 @@ def _search_directly(
def search(
self, fp: List[int], length: int, max_results: Optional[int] = None
) -> List[FingerprintMatch]:
fpstore_matches = []
if self.fpstore is not None:
try:
fpstore_matches = self._search_via_fpstore(fp, length, max_results)
return fpstore_matches
except Exception:
logger.exception("Error searching via fpstore")

matches = self._search_directly(fp, length, max_results)

logger.debug(
"Search results %s vs %s",
matches,
fpstore_matches,
)

return matches
return self._search_via_fpstore(fp, length, max_results)
else:
return self._search_directly(fp, length, max_results)


def insert_fingerprint(
Expand Down

0 comments on commit 6b716ac

Please sign in to comment.