Parcourir la source

Skip integrations if there are no entries to push

Harry Cheng il y a 3 ans
Parent
commit
d9777f1439
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      reader/processor/processor.go

+ 1 - 1
reader/processor/processor.go

@@ -107,7 +107,7 @@ func ProcessFeedEntries(store *storage.Storage, feed *model.Feed, user *model.Us
 	intg, err := store.Integration(feed.UserID)
 	intg, err := store.Integration(feed.UserID)
 	if err != nil {
 	if err != nil {
 		logger.Error("[Processor] Get integrations for user %d failed: %v; the refresh process will go on, but no integrations will run this time.", feed.UserID, err)
 		logger.Error("[Processor] Get integrations for user %d failed: %v; the refresh process will go on, but no integrations will run this time.", feed.UserID, err)
-	} else if intg != nil {
+	} else if intg != nil && len(entriesToPush) > 0 {
 		go func() {
 		go func() {
 			integration.PushEntries(entriesToPush, intg)
 			integration.PushEntries(entriesToPush, intg)
 		}()
 		}()