From 6c38b30be9ff127f200ffbfe75c0dc48612f37a6 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 13 十二月 2024 15:58:14 +0800
Subject: [PATCH] update
---
models/gather_model.go | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/models/gather_model.go b/models/gather_model.go
index fd429ab..c384db2 100644
--- a/models/gather_model.go
+++ b/models/gather_model.go
@@ -114,6 +114,9 @@
})
newRecords = append(newRecords, record)
}
+ if len(newRecords) == 0 {
+ return nil
+ }
aggregation, err := analyzeAndAggregate(newRecords)
if err != nil {
@@ -402,6 +405,9 @@
}
func analyzeAndAggregate(records []*GatherRecord) (map[GatherLocationTime]set.StringSet, error) {
+ if len(records) == 0 {
+ return nil, nil
+ }
aggregation := make(map[GatherLocationTime]set.StringSet)
domainIds := set.NewStringSet()
for _, record := range records {
--
Gitblit v1.8.0