mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Not counting saved stories among thousands of feeds.
This commit is contained in:
parent
fa67384f20
commit
cbd324ea14
1 changed files with 3 additions and 1 deletions
|
@ -3037,8 +3037,10 @@ class MStarredStoryCounts(mongo.Document):
|
|||
if user_feeds.get(0, False):
|
||||
user_feeds[-1] = user_feeds.get(0, 0)
|
||||
del user_feeds[0]
|
||||
|
||||
|
||||
too_many_feeds = False if len(user_feeds) < 1000 else True
|
||||
for feed_id, count in user_feeds.items():
|
||||
if too_many_feeds and count <= 1: continue
|
||||
cls.objects(user_id=user_id,
|
||||
feed_id=feed_id,
|
||||
slug="feed:%s" % feed_id).update_one(set__count=count,
|
||||
|
|
Loading…
Add table
Reference in a new issue