mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00
Further pushing out feed updates.
This commit is contained in:
parent
a75554374b
commit
d167788f29
1 changed files with 4 additions and 4 deletions
|
@ -1230,7 +1230,7 @@ class Feed(models.Model):
|
|||
# .5 hours for 2 subscribers.
|
||||
# .25 hours for 3 subscribers.
|
||||
# 1 min for 10 subscribers.
|
||||
subscriber_bonus = 6 * 60 / max(.167, max(0, self.active_subscribers)**3)
|
||||
subscriber_bonus = 12 * 60 / max(.167, max(0, self.active_subscribers)**3)
|
||||
if self.premium_subscribers > 0:
|
||||
subscriber_bonus /= min(self.active_subscribers+self.premium_subscribers, 5)
|
||||
|
||||
|
@ -1242,13 +1242,13 @@ class Feed(models.Model):
|
|||
slow_punishment = 2 * self.last_load_time
|
||||
elif self.last_load_time >= 200:
|
||||
slow_punishment = 6 * self.last_load_time
|
||||
total = max(5, int(updates_per_day_delay + subscriber_bonus + slow_punishment))
|
||||
total = max(10, int(updates_per_day_delay + subscriber_bonus + slow_punishment))
|
||||
|
||||
if self.active_premium_subscribers > 3:
|
||||
if self.active_premium_subscribers > 5:
|
||||
total = min(total, 60) # 1 hour minimum for premiums
|
||||
|
||||
if ((self.stories_last_month == 0 or self.average_stories_per_month == 0)):
|
||||
total = total * random.randint(1, 12)
|
||||
total = total * random.randint(1, 24)
|
||||
|
||||
if self.is_push:
|
||||
total = total * 20
|
||||
|
|
Loading…
Add table
Reference in a new issue