mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Skipping tasking of feeds when queue is too high. Use the random queue.
This commit is contained in:
parent
00591ee7ad
commit
d63556bc06
2 changed files with 4 additions and 3 deletions
|
@ -1258,9 +1258,9 @@ class Feed(models.Model):
|
|||
total = max(10, int(updates_per_day_delay + subscriber_bonus + slow_punishment))
|
||||
|
||||
if self.active_premium_subscribers >= 3:
|
||||
total = min(total, 60) # 1 hour minimum for premiums
|
||||
total = min(total, 3*60) # 1 hour minimum for premiums
|
||||
elif self.active_premium_subscribers >= 2:
|
||||
total = min(total, 6*60)
|
||||
total = min(total, 12*60)
|
||||
elif self.active_premium_subscribers >= 1:
|
||||
total = min(total, 24*60)
|
||||
|
||||
|
|
|
@ -33,11 +33,12 @@ class TaskFeeds(Task):
|
|||
r.zcard('scheduled_updates')))
|
||||
|
||||
# Regular feeds
|
||||
if tasked_feeds_size < 50000:
|
||||
if tasked_feeds_size < 1000:
|
||||
feeds = r.srandmember('queued_feeds', 1000)
|
||||
Feed.task_feeds(feeds, verbose=True)
|
||||
active_count = len(feeds)
|
||||
else:
|
||||
logging.debug(" ---> ~SN~FBToo many tasked feeds. ~SB%s~SN tasked." % tasked_feeds_size)
|
||||
active_count = 0
|
||||
cp1 = time.time()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue