mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00
Doubling resync likelihood.
This commit is contained in:
parent
53b5c4e2db
commit
1cc128b5a2
2 changed files with 2 additions and 2 deletions
|
@ -701,7 +701,7 @@ class MUserStory(mongo.Document):
|
||||||
print " ---> Syncing %s stories (%s)" % (total, user_id or feed_id)
|
print " ---> Syncing %s stories (%s)" % (total, user_id or feed_id)
|
||||||
for i, read_story in enumerate(read_stories):
|
for i, read_story in enumerate(read_stories):
|
||||||
if (i+1) % 1000 == 0:
|
if (i+1) % 1000 == 0:
|
||||||
print " ---> %s/%s" % (i, total)
|
print " ---> %s/%s" % (i+1, total)
|
||||||
read_story.sync_redis(r)
|
read_story.sync_redis(r)
|
||||||
|
|
||||||
class UserSubscriptionFolders(models.Model):
|
class UserSubscriptionFolders(models.Model):
|
||||||
|
|
|
@ -343,7 +343,7 @@ class Dispatcher:
|
||||||
feed.known_good = True
|
feed.known_good = True
|
||||||
feed.fetched_once = True
|
feed.fetched_once = True
|
||||||
feed = feed.save()
|
feed = feed.save()
|
||||||
if random.random() <= 0.01:
|
if random.random() <= 0.02:
|
||||||
feed.sync_redis()
|
feed.sync_redis()
|
||||||
MUserStory.delete_old_stories(feed_id=feed.pk)
|
MUserStory.delete_old_stories(feed_id=feed.pk)
|
||||||
MUserStory.sync_all_redis(feed_id=feed.pk)
|
MUserStory.sync_all_redis(feed_id=feed.pk)
|
||||||
|
|
Loading…
Add table
Reference in a new issue