Increasing fetches for long tail feeds.

This commit is contained in:
Samuel Clay 2013-04-07 17:30:58 -07:00
parent 48c5d4d53e
commit 5c0b9de511

View file

@ -1259,6 +1259,10 @@ class Feed(models.Model):
if self.active_premium_subscribers >= 3:
total = min(total, 60) # 1 hour minimum for premiums
elif self.active_premium_subscribers >= 2:
total = min(total, 3*60)
elif self.active_premium_subscribers >= 1:
total = min(total, 12*60)
if self.is_push:
total = total * 20
@ -1281,7 +1285,7 @@ class Feed(models.Model):
self.stories_last_month))
random_factor = random.randint(0, total) / 4
return total, random_factor*8
return total, random_factor*4
def set_next_scheduled_update(self, verbose=False, skip_scheduling=False):
r = redis.Redis(connection_pool=settings.REDIS_FEED_POOL)