From 2597f83ae2f53fb599dfb71812492024ddb9db1d Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Mon, 21 Nov 2016 18:12:52 -0800 Subject: [PATCH] Adding user count to notifications tester. --- apps/notifications/models.py | 2 +- apps/notifications/views.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/notifications/models.py b/apps/notifications/models.py index 9244382eb..7e3226cbe 100644 --- a/apps/notifications/models.py +++ b/apps/notifications/models.py @@ -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 = {} diff --git a/apps/notifications/views.py b/apps/notifications/views.py index eb6ef7151..6bec63ce4 100644 --- a/apps/notifications/views.py +++ b/apps/notifications/views.py @@ -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} \ No newline at end of file + return {"message": "Pushed %s notifications to %s users" % (sent_count, user_count)} \ No newline at end of file