RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Update ext field type of heartbeat message (#13490)
Jin Hai7f6a9e8ee994
diff --git a/internal/admin/handler.go b/internal/admin/handler.goindex eb5b4d5055..4a4e36bfb6 100644--- a/internal/admin/handler.go+++ b/internal/admin/handler.go@@ -642,7 +642,7 @@ func (h *Handler) GetUserPermission(c *gin.Context) {// GetServices handle get all servicesfunc (h *Handler) GetServices(c *gin.Context) {- services, err := h.service.GetAllServices()+ services, err := h.service.ListServices()if err != nil {c.JSON(http.StatusInternalServerError, gin.H{"code": common.CodeServerError,@@ -908,7 +908,10 @@ func (h *Handler) TestSandboxConnection(c *gin.Context) {result, err := h.service.TestSandboxConnection(req.ProviderType, req.Config)if err != nil {- errorResponse(c, err.Error(), 400)+ c.JSON(http.StatusBadRequest, gin.H{+ "code": common.CodeBadRequest,+ "message": "Invalid access token",+ })return}@@ -962,7 +965,10 @@ func (h *Handler) HandleNoRoute(c *gin.Context) {func (h *Handler) Reports(c *gin.Context) {var req common.BaseMessageif err := c.ShouldBindJSON(&req); err != nil {- errorResponse(c, "Invalid request body: "+err.Error(), 400)+ c.JSON(http.StatusBadRequest, gin.H{+ "code": common.CodeBadRequest,+ "message": "Invalid request body: " + err.Error(),+ })return}@@ -973,7 +979,10 @@ func (h *Handler) Reports(c *gin.Context) {// Only process heartbeat messages for nowif req.MessageType != common.MessageHeartbeat {- errorResponse(c, "Unsupported report type: "+string(req.MessageType), 400)+ c.JSON(http.StatusBadRequest, gin.H{+ "code": common.CodeBadRequest,+ "message": "Unsupported report type: " + string(req.MessageType),+ })return}diff --git a/internal/admin/service.go b/internal/admin/service.goindex 7a236769b9..6e2e1b346c 100644--- a/internal/admin/service.go+++ b/internal/admin/service.go@@ -277,8 +277,8 @@ func (s *Service) GetUserPermission(username string) ([]map[string]interface{},return []map[string]interface{}{}, nil}-// GetAllServices get all services-func (s *Service) GetAllServices() ([]map[string]interface{}, error) {+// ListServices get all services+func (s *Service) ListServices() ([]map[string]interface{}, error) {allConfigs := server.GetAllConfigs()var result []map[string]interface{}diff --git a/internal/common/status_message.go b/internal/common/status_message.goindex 76d29ac3eb..d538848a9e 100644--- a/internal/common/status_message.go+++ b/internal/common/status_message.go@@ -21,13 +21,13 @@ const ()type BaseMessage struct {- MessageID int64 `json:"report_id"`- MessageType MessageType `json:"report_type"`- ServerName string `json:"server_id"`- ServerType ServerType `json:"server_type"`- Host string `json:"host"`- Port int `json:"port"`- Version string `json:"version"`- Timestamp time.Time `json:"timestamp"`- Ext map[string]interface{} `json:"ext,omitempty"`+ MessageID int64 `json:"report_id"`+ MessageType MessageType `json:"report_type"`+ ServerName string `json:"server_id"`+ ServerType ServerType `json:"server_type"`+ Host string `json:"host"`+ Port int `json:"port"`+ Version string `json:"version"`+ Timestamp time.Time `json:"timestamp"`+ Ext interface{} `json:"ext,omitempty"`}diff --git a/internal/service/heartbeat_sender.go b/internal/service/heartbeat_sender.goindex ec2b198320..8a80c47137 100644--- a/internal/service/heartbeat_sender.go+++ b/internal/service/heartbeat_sender.go@@ -103,7 +103,7 @@ func (h *HeartbeatSender) SendHeartbeat() error {Port: h.port,Version: h.version,Timestamp: time.Now(),- Ext: make(map[string]interface{}),+ Ext: nil,}jsonData, err := json.Marshal(message)