mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Chunking those mondo zadd calls.
This commit is contained in:
parent
e37e275d7c
commit
f95328a298
1 changed files with 2 additions and 1 deletions
|
@ -263,7 +263,8 @@ class UserSubscription(models.Model):
|
|||
if not story_hashes:
|
||||
return [], []
|
||||
|
||||
r.zadd(ranked_stories_keys, **dict(story_hashes))
|
||||
for story_hash_group in chunks(story_hashes, 100):
|
||||
r.zadd(ranked_stories_keys, **dict(story_hash_group))
|
||||
story_hashes = range_func(ranked_stories_keys, offset, limit)
|
||||
|
||||
if read_filter == "unread":
|
||||
|
|
Loading…
Add table
Reference in a new issue