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/subscribe.go | 3 --- service/notification.go | 5 ++++- 2 files changed, 4 insertions(+), 4 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 } diff --git a/service/subscribe.go b/service/subscribe.go index cbdeb97..7867ab7 100644 --- a/service/subscribe.go +++ b/service/subscribe.go @@ -100,7 +100,6 @@ return true }) - logger.Debug("Add Face Notification. faceId: %s", face.FaceID) } func AddPersonNotification(person *vo.PersonObject) { @@ -108,6 +107,4 @@ value.(TaskProcInfo).task.addPerson(person) return true }) - - logger.Debug("Add Person Notification. personId: %s", person.PersonID) } -- Gitblit v1.8.0