From dade4bb9c1d5a5220e87ae457568b337a256df3a Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Sun, 1 May 2011 20:37:34 -0400 Subject: [PATCH] Making feed updates a touch more often based on # of premium subscribers. --- apps/rss_feeds/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/rss_feeds/models.py b/apps/rss_feeds/models.py index 566eb2464..818b3ac87 100644 --- a/apps/rss_feeds/models.py +++ b/apps/rss_feeds/models.py @@ -796,7 +796,7 @@ class Feed(models.Model): updates_per_day_delay = 2 * 60 / max(.25, ((max(0, self.active_subscribers)**.15) * (updates_per_month**1.5))) if self.premium_subscribers > 0: - updates_per_day_delay /= min(self.active_subscribers, 5) + updates_per_day_delay /= min(self.active_subscribers+self.premium_subscribers, 5) # Lots of subscribers = lots of updates # 24 hours for 0 subscribers. # 4 hours for 1 subscriber. @@ -805,7 +805,7 @@ class Feed(models.Model): # 1 min for 10 subscribers. subscriber_bonus = 4 * 60 / max(.167, max(0, self.active_subscribers)**3) if self.premium_subscribers > 0: - subscriber_bonus /= min(self.active_subscribers, 5) + subscriber_bonus /= min(self.active_subscribers+self.premium_subscribers, 5) slow_punishment = 0 if self.num_subscribers <= 1: