Skip to content

Always consider DAEMON_FEED_LIMIT in update.php's "--daemon-loop".

James Smith requested to merge DeviousNull/tt-rss:daemon-feed-limit into master

Currently, the DAEMON_FEED_LIMIT configuration option is ignored in update.php's "--daemon-loop" hander when the "--pidlock" parameter is also present. In that situation, a static limit of 50 is used instead. Since update_daemon2.php calls update.php with both of those parameters, the practical result is that DAEMON_FEED_LIMIT is never used.

This one-line change makes update.php use whichever value is smaller between DAEMON_FEED_LIMIT and 50, when it is run with both "--daemon-loop" and "--pidlock".

My use case for this change is a workaround for an issue with a 3rd party: I am fetching hundreds of feeds from a website with a broken rate-limiting implementation, and the webmaster for that server is unwilling to change how they have implemented rate-limiting.

As a result, I need to throttle the rate at which TT-RSS fetches feeds from them, to guarantee that I do not exceed the website's rate limit. And, the simplest way to perform that throttling is to greatly decrease DAEMON_FEED_LIMIT, and make use of the existing delay between batches to reduces the rate at which TT-RSS fetches feeds.

Merge request reports