feat: add hourly API request cap setting to prevent rate limiting

This commit is contained in:
Admin9705
2025-05-10 08:25:04 -04:00
parent 8d59de4851
commit 94f286b57d
3 changed files with 8 additions and 5 deletions
+4 -3
View File
@@ -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>
+2 -1
View File
@@ -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
}
+2 -1
View File
@@ -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):