mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-11 18:01:26 +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:
@@ -23,7 +23,7 @@ import (
|
||||
"fmt"
|
||||
"image"
|
||||
"log/slog"
|
||||
"os"
|
||||
"ragflow/internal/common"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -294,7 +294,7 @@ func emptyPDFResult(filename string) ParseResult {
|
||||
}
|
||||
|
||||
func deepDocAnalyzerFromEnv() deepdoctype.DocAnalyzer {
|
||||
baseURL := strings.TrimSpace(os.Getenv("DEEPDOC_URL"))
|
||||
baseURL := strings.TrimSpace(common.GetEnv(common.EnvDeepDocURL))
|
||||
if baseURL == "" {
|
||||
return &deepdocpdf.MockDocAnalyzer{Healthy: true}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user