mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Fixing redis issues by pipelining.
This commit is contained in:
parent
07c5f95c36
commit
c2dcbe27f8
1 changed files with 4 additions and 2 deletions
|
@ -197,8 +197,10 @@ class UserSubscription(models.Model):
|
|||
|
||||
dump = r.dump(unread_ranked_stories_key)
|
||||
if dump:
|
||||
rt.delete(unread_ranked_stories_key)
|
||||
rt.restore(unread_ranked_stories_key, 1*60*60, dump)
|
||||
pipeline = rt.pipeline()
|
||||
pipeline.delete(unread_ranked_stories_key)
|
||||
pipeline.restore(unread_ranked_stories_key, 1*60*60, dump)
|
||||
pipeline.execute()
|
||||
r.delete(unread_ranked_stories_key)
|
||||
|
||||
current_time = int(time.time() + 60*60*24)
|
||||
|
|
Loading…
Add table
Reference in a new issue