fix(redis): connect during health checks
This commit is contained in:
parent
0d828315bb
commit
ef75f08392
@ -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()
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user