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

View File

@@ -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}
}