mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-17 21:27:23 +08:00
Go: introduce clickhouse (#16996)
### Summary Introduce Clickhouse for data statistics. Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -27,6 +27,7 @@ import (
|
||||
"ragflow/internal/agent/audio"
|
||||
"ragflow/internal/agent/canvas"
|
||||
agenttool "ragflow/internal/agent/tool"
|
||||
"ragflow/internal/engine/clickhouse"
|
||||
"ragflow/internal/handler"
|
||||
ingestion "ragflow/internal/ingestion/service"
|
||||
"ragflow/internal/mcp"
|
||||
@@ -363,6 +364,12 @@ func main() {
|
||||
common.Error("Failed to initialize message queue engine", err)
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
if err = clickhouse.Init(&config.Clickhouse, ctx); err != nil {
|
||||
common.Error("Failed to initialize ClickHouse", err)
|
||||
}
|
||||
defer clickhouse.Close()
|
||||
|
||||
// Initialize server variables (runtime variables that can change during operation)
|
||||
// This must be done after Cache is initialized
|
||||
if err = server.InitVariables(redis.Get()); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user