mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-03 06:17:29 +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:
@@ -21,6 +21,8 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"ragflow/internal/common"
|
||||
|
||||
//"os/signal"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
@@ -482,7 +484,7 @@ Commands:
|
||||
|
||||
// HistoryFile returns the path to the history file
|
||||
func HistoryFile() string {
|
||||
return os.Getenv("HOME") + "/" + historyFileName
|
||||
return common.GetEnv(common.EnvHome) + "/" + historyFileName
|
||||
}
|
||||
|
||||
const historyFileName = ".ragflow_cli_history"
|
||||
|
||||
Reference in New Issue
Block a user