From 9843a0970dcccfc9bdaa99a4f51053f64c8cc9fa Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期二, 18 六月 2024 16:45:17 +0800
Subject: [PATCH] 修改person订阅

---
 service/notification.go |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/service/notification.go b/service/notification.go
index 32b67a1..060fe51 100644
--- a/service/notification.go
+++ b/service/notification.go
@@ -48,6 +48,7 @@
 	task.mutex.Lock()
 	defer task.mutex.Unlock()
 
+	logger.Debug("Add Face Notification %s. faceId: %s", task.conf.Ext.Title, face.FaceID)
 	task.faceList = append(task.faceList, face)
 }
 
@@ -59,6 +60,7 @@
 	task.mutex.Lock()
 	defer task.mutex.Unlock()
 
+	logger.Debug("Add Person Notification  %s. personId: %s", task.conf.Ext.Title, person.PersonID)
 	task.personList = append(task.personList, person)
 }
 
@@ -72,6 +74,7 @@
 		case vo.SubscribeFace:
 			msg = task.packFaceNotificationMsg()
 		case vo.SubscribePerson:
+			msg = task.packPersonNotificationMsg()
 		}
 
 		if msg != nil {
@@ -122,7 +125,7 @@
 
 func (task *NotificationTask) packPersonNotificationMsg() *vo.RequestSubscribeNotification {
 	triggerTime := time.Now().Format("20060102150405")
-	if len(task.faceList) == 0 {
+	if len(task.personList) == 0 {
 		return nil
 	}
 

--
Gitblit v1.8.0