Adding user count to notifications tester.

This commit is contained in:
Samuel Clay 2016-11-21 18:12:52 -08:00
parent c9649abce0
commit 2597f83ae2
2 changed files with 3 additions and 3 deletions

View file

@ -158,7 +158,7 @@ class MUserFeedNotification(mongo.Document):
if sent:
sent_count += 1
total_sent_count += 1
return total_sent_count
return total_sent_count, len(notifications)
def classifiers(self, usersub):
classifiers = {}

View file

@ -95,6 +95,6 @@ def force_push(request):
count = request.REQUEST.get('count', 1)
logging.user(user, "~BM~FWForce pushing %s stories: ~SB%s" % (count, Feed.get_by_id(feed_id)))
sent_count = MUserFeedNotification.push_feed_notifications(feed_id, new_stories=count, force=True)
sent_count, user_count = MUserFeedNotification.push_feed_notifications(feed_id, new_stories=count, force=True)
return {"message": "Pushed %s notifications" % sent_count}
return {"message": "Pushed %s notifications to %s users" % (sent_count, user_count)}