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:
Jin Hai
2026-07-10 11:58:32 +08:00
committed by GitHub
parent 289ca28ce2
commit add7b9486f
67 changed files with 479 additions and 329 deletions
+1 -2
View File
@@ -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"