fix: 修复客户端实例记录问题并删除父应用功能

- 客户端实例唯一标识改为 app_config_id+appName+env+ip 四元组
- 新增 last_ping_at 字段,轮询即更新,拉取配置时更新 last_fetch_at
- FetchChangedConfigs 无变更时也记录客户端实例
- 清理逻辑改为基于 last_ping_at 超过5分钟删除
- 删除父应用(ParentId)相关功能
This commit is contained in:
2026-04-30 21:06:36 +08:00
parent ed94f53306
commit 8957286bb5
5 changed files with 54 additions and 59 deletions
+1 -1
View File
@@ -94,7 +94,7 @@ func (h *ConfigHandler) List(c *gin.Context) {
}
var results []countResult
dao.Engine.Table("client_instance").
Select("app_config_id, COUNT(DISTINCT ip) as cnt").
Select("app_config_id, COUNT(*) as cnt").
In("app_config_id", configIds).
GroupBy("app_config_id").
Find(&results)