fix(redis): connect during health checks

This commit is contained in:
kcar 2026-05-27 16:46:39 +01:00
parent 0d828315bb
commit ef75f08392
2 changed files with 4 additions and 2 deletions

View File

@ -491,7 +491,9 @@ class RedisManager:
try:
if not self.client:
raise Exception("No Redis connection")
logger.info("Redis health check has no active client; connecting now")
if not self.connect():
raise Exception("No Redis connection")
# Test connection
self.client.ping()

View File

@ -16,7 +16,7 @@ logging = logger.get_logger(
from fastapi import APIRouter, HTTPException
from langchain_classic.chains import GraphCypherQAChain
from langchain_community.graphs import Neo4jGraph
from langchain_community.chat_models import ChatOpenAI
from langchain_openai import ChatOpenAI
from langchain_classic.prompts.prompt import PromptTemplate
from routers.llm.private.ollama.ollama_wrapper import OllamaWrapper
from modules.database.tools.neontology.utils import get_node_types, get_rels_by_type