mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-03 22:30:31 +08:00
Go: merge duplicate codes (#16783)
### Summary 1. merge heartbeat function. 2. introduce all environments --------- Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -474,7 +474,7 @@ func runAdmin(args *serverArgs) error {
|
||||
|
||||
func runIngestor(args *serverArgs) error {
|
||||
// Initialize tokenizer (rag_analyzer)
|
||||
dictPath := os.Getenv("RAGFLOW_DICT_PATH")
|
||||
dictPath := common.GetEnv(common.EnvRAGFlowDictPath)
|
||||
if dictPath == "" {
|
||||
dictPath = "/usr/share/infinity/resource"
|
||||
}
|
||||
@@ -639,7 +639,7 @@ func runAPI(args *serverArgs) error {
|
||||
local.InitAdminStatus(1, "admin server not connected")
|
||||
|
||||
// Initialize tokenizer (rag_analyzer)
|
||||
dictPath := os.Getenv("RAGFLOW_DICT_PATH")
|
||||
dictPath := common.GetEnv(common.EnvRAGFlowDictPath)
|
||||
if dictPath == "" {
|
||||
dictPath = "/usr/share/infinity/resource"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user