| | |
| | | |
| | | // 往ES插数据 |
| | | func InsertToEs(msg ruleserver.ResultMsg) { |
| | | |
| | | // 直接从规则的标签数据里拿符合规则的人脸结果 |
| | | logger.Debug("插入数据前看看报警标志位:",msg.RuleResult["timeLable"].(string)) |
| | | if msg.RuleResult["timeLable"].(string) == "10" { |
| | | var timeLabel string |
| | | // 直接从规则的标签数据里拿符合规则的人脸结果 |
| | | if msg.RuleResult["timeLabel"] != nil { |
| | | timeLabel = msg.RuleResult["timeLabel"].(string) |
| | | } |
| | | logger.Debug("插入数据前看看报警标志位:",msg.RuleResult["timeLabel"].(string)) |
| | | if timeLabel == "10" { |
| | | if msg.RuleResult["face"] != nil && len(msg.RuleResult["face"].([]ruleserver.Arg)) > 0 { |
| | | logger.Info("往ES插人脸数据") |
| | | for _, face := range msg.RuleResult["face"].([]ruleserver.Arg) { |