remove old import

This commit is contained in:
HotSwapp
2025-08-14 21:27:34 -05:00
parent bfc04a6909
commit 679ab4446a
17 changed files with 2016 additions and 557 deletions

View File

@@ -26,6 +26,7 @@ from app.models.lookups import FormIndex, Employee, FileType, FileStatus, Transa
from app.models.user import User
from app.auth.security import get_current_user
from app.services.cache import cache_get_json, cache_set_json
from app.utils.logging import app_logger
router = APIRouter()
@router.get("/_debug")
@@ -48,15 +49,16 @@ async def search_debug(
fts_status["files"] = "files_fts" in names
fts_status["ledger"] = "ledger_fts" in names
fts_status["qdros"] = "qdros_fts" in names
except Exception:
pass
except Exception as e:
app_logger.warning(f"Failed to check FTS status: {str(e)}")
# Detect Redis by trying to obtain a client
try:
from app.services.cache import _get_client # type: ignore
client = await _get_client()
redis_ok = client is not None
except Exception:
except Exception as e:
app_logger.debug(f"Redis not available: {str(e)}")
redis_ok = False
return {
"fts": fts_status,