mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-09-08 10:14:35 +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:
@@ -19,7 +19,6 @@ package tokenizer
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"ragflow/internal/common"
|
||||
"runtime"
|
||||
"sync"
|
||||
@@ -96,7 +95,7 @@ func Init(cfg *PoolConfig) error {
|
||||
|
||||
// Set default values
|
||||
if cfg.DictPath == "" {
|
||||
if env := os.Getenv("RAGFLOW_DICT_PATH"); env != "" {
|
||||
if env := common.GetEnv(common.EnvRAGFlowDictPath); env != "" {
|
||||
cfg.DictPath = env
|
||||
} else {
|
||||
cfg.DictPath = "/usr/share/infinity/resource"
|
||||
|
||||
Reference in New Issue
Block a user