8000 fix(search): satisfy mypy on the text index sync at startup by adeelahmad · Pull Request #178 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content
Merged
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
5 changes: 4 additions & 1 deletion fastapi_backend/app/core/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ def current(self) -> dict[str, Any]:
return self.settings.current()

def _index_text(self) -> None:
index = self.db.textindex
if index is None:
return
try:
self.db.textindex.sync()
index.sync()
except Exception: # noqa: BLE001 - the first search tries again
log.warning("couldn't bring the full-text index up to date", exc_info=True)

Expand Down
Loading
0