Fixing bug in notifications which caused multiple repeat notifications to get sent out when queue gets backed up.

This commit is contained in:
Samuel Clay 2017-01-03 16:04:02 -08:00
parent fded3577a1
commit 9c844c9441

View file

@ -144,8 +144,8 @@ class MUserFeedNotification(mongo.Document):
if sent_count >= 3:
logging.debug("Sent too many, ignoring...")
continue
if story['story_date'] < last_notification_date and not force:
logging.debug("Story date older than last notification date: %s < %s" % (story['story_date'], last_notification_date))
if story['story_date'] <= last_notification_date and not force:
logging.debug("Story date older than last notification date: %s <= %s" % (story['story_date'], last_notification_date))
continue
if story['story_date'] > user_feed_notification.last_notification_date: