mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-03 14:27:32 +08:00
Go: add context to redis client (#17689)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -361,7 +361,7 @@ func main() {
|
||||
defer engine.Close()
|
||||
|
||||
// Initialize Redis cache
|
||||
if err = redis.Init(); err != nil {
|
||||
if err = redis.Init(ctx); err != nil {
|
||||
common.Fatal("Failed to initialize Redis", zap.Error(err))
|
||||
}
|
||||
defer redis.Close()
|
||||
@@ -784,7 +784,7 @@ func startServer(ctx context.Context) {
|
||||
agentOpts.stateSerializer,
|
||||
agentOpts.runTracker,
|
||||
)
|
||||
agentHandler := handler.NewAgentHandler(agentService, fileService)
|
||||
agentHandler := handler.NewAgentHandler(ctx, agentService, fileService)
|
||||
|
||||
// Public chatbot/agentbot endpoints (api/v1/chatbots/...,
|
||||
// api/v1/agentbots/...) and the agent attachment download.
|
||||
|
||||
Reference in New Issue
Block a user