zhangzengfei
2024-06-18 9843a0970dcccfc9bdaa99a4f51053f64c8cc9fa
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
   }