mirror of
https://github.com/plexguide/Huntarr.git
synced 2026-04-29 00:50:18 -05:00
feat: add hourly API request cap setting to prevent rate limiting
This commit is contained in:
@@ -1085,6 +1085,7 @@ const SettingsForms = {
|
||||
settings.command_wait_attempts = getInputValue('#command_wait_attempts', 600);
|
||||
settings.minimum_download_queue_size = getInputValue('#minimum_download_queue_size', -1);
|
||||
settings.log_refresh_interval_seconds = getInputValue('#log_refresh_interval_seconds', 30);
|
||||
settings.hourly_cap = getInputValue('#hourly_cap', 20);
|
||||
}
|
||||
|
||||
// For other app types, collect settings
|
||||
@@ -1223,9 +1224,9 @@ const SettingsForms = {
|
||||
<p class="setting-help">Enable verbose logging for troubleshooting (applies to all apps)</p>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<label for="log_refresh_interval_seconds">Log Refresh Interval:</label>
|
||||
<input type="number" id="log_refresh_interval_seconds" class="short-number-input" min="1" value="${settings.log_refresh_interval_seconds || 30}">
|
||||
<p class="setting-help">Interval in seconds to refresh log display (applies to all apps)</p>
|
||||
<label for="hourly_cap">API Cap - Hourly:</label>
|
||||
<input type="number" id="hourly_cap" class="short-number-input" min="1" value="${settings.hourly_cap || 20}">
|
||||
<p class="setting-help">Maximum API requests per hour (helps prevent rate limiting)</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -10,5 +10,6 @@
|
||||
"command_wait_delay": 1,
|
||||
"command_wait_attempts": 600,
|
||||
"minimum_download_queue_size": -1,
|
||||
"api_timeout": 120
|
||||
"api_timeout": 120,
|
||||
"hourly_cap": 20
|
||||
}
|
||||
@@ -280,7 +280,8 @@ ADVANCED_SETTINGS = [
|
||||
"minimum_download_queue_size",
|
||||
"log_refresh_interval_seconds",
|
||||
"debug_mode",
|
||||
"stateful_management_hours"
|
||||
"stateful_management_hours",
|
||||
"hourly_cap"
|
||||
]
|
||||
|
||||
def get_advanced_setting(setting_name, default_value=None):
|
||||
|
||||
Reference in New Issue
Block a user