Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Add more server types (#21127)

Jin Hai724f03670fdb
diff --git a/internal/admin/state.go b/internal/admin/state.go
index 1a5d0e41c2..d9b2df0230 100644
--- a/internal/admin/state.go
+++ b/internal/admin/state.go
@@ -17,6 +17,7 @@
package admin
import (
+ "fmt"
"ragflow/internal/common"
"sync"
"time"
@@ -48,6 +49,8 @@ func (s *ServerStore) UpdateServerInfo(serverName string, status *common.BaseMes
s.servers[serverName] = status
case common.ServerTypeFileSyncer:
s.servers[serverName] = status
+ default:
+ return fmt.Errorf("unknown server type: %s", status.ServerType)
}
return CheckClientStatus(serverName, status)
diff --git a/internal/common/status_message.go b/internal/common/status_message.go
index 2c92590213..d350af2a08 100644
--- a/internal/common/status_message.go
+++ b/internal/common/status_message.go
@@ -31,9 +31,11 @@ const (
type ServerType string
const (
- ServerTypeAPI ServerType = "api_server" // API server
- ServerTypeIngestion ServerType = "ingestor" // Ingestion server
- ServerTypeFileSyncer ServerType = "file_syncer" // File syncer server
+ ServerTypeAPI ServerType = "api_server" // API server
+ ServerTypeIngestion ServerType = "ingestor" // Ingestion server
+ ServerTypeFileSyncer ServerType = "file_syncer" // File syncer server
+ ServerTypeDeepDocGPU ServerType = "deep_doc_gpu" // DeepDoc GPU server
+ ServerTypeDeepDocCPU ServerType = "deep_doc_cpu" // DeepDoc CPU server
)
type BaseMessage struct {