diff options
author | Andrew Dolgov <[email protected]> | 2022-06-09 09:05:36 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2022-06-09 09:06:52 +0300 |
commit | 2975c7297b680e486f326939b9fba82d8cf18035 (patch) | |
tree | 259e50fa137819332b804bcef231e8d7d307658b /classes/config.php | |
parent | 7cd26272fac706f6a0b1bbc8b12ca1a8d2c5a0d9 (diff) |
throttle updates if received HTTP 429 (Too Many Requests)
Diffstat (limited to 'classes/config.php')
-rw-r--r-- | classes/config.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/classes/config.php b/classes/config.php index cc089b7ba..74546e3f2 100644 --- a/classes/config.php +++ b/classes/config.php @@ -189,6 +189,9 @@ class Config { /** http user agent (changing this is not recommended) */ const HTTP_USER_AGENT = "HTTP_USER_AGENT"; + /** delay updates for this feed if received HTTP 429 (Too Many Requests) for this amount of seconds (base value, actual delay is base...base*2) */ + const HTTP_429_THROTTLE_INTERVAL = "HTTP_429_THROTTLE_INTERVAL"; + /** default values for all global configuration options */ private const _DEFAULTS = [ Config::DB_TYPE => [ "pgsql", Config::T_STRING ], @@ -245,6 +248,7 @@ class Config { Config::AUTH_MIN_INTERVAL => [ 5, Config::T_INT ], Config::HTTP_USER_AGENT => [ 'Tiny Tiny RSS/%s (https://tt-rss.org/)', Config::T_STRING ], + Config::HTTP_429_THROTTLE_INTERVAL => [ 3600, Config::T_INT ], ]; /** @var Config|null */ |