fix poll mcp
This commit is contained in:
@@ -17,6 +17,8 @@ DEFAULT_CONFIG: dict[str, object] = {
|
||||
"graylog_range_seconds": 300,
|
||||
"graylog_max_events_per_stream": 5000,
|
||||
"graylog_raw_sample_events": 5000,
|
||||
"graylog_mcp_call_timeout_seconds": 8,
|
||||
"graylog_mcp_poll_timeout_seconds": 120,
|
||||
"baseline_retention_days": 14,
|
||||
"baseline_value_retention_days": 7,
|
||||
"baseline_max_values_per_field": 2000,
|
||||
@@ -71,9 +73,9 @@ class ConfigStore:
|
||||
current[key] = value
|
||||
elif key == "graylog_fetch_mode" and value in {"auto", "raw", "aggregate"}:
|
||||
current[key] = value
|
||||
elif key in {"graylog_range_seconds", "graylog_max_events_per_stream", "graylog_raw_sample_events", "baseline_retention_days", "baseline_value_retention_days", "baseline_max_values_per_field", "baseline_training_days", "profile_advisor_timeout", "threat_intel_daily_limit", "threat_intel_ttl_seconds", "threat_intel_error_ttl_seconds", "abuseipdb_max_age_days"}:
|
||||
elif key in {"graylog_range_seconds", "graylog_max_events_per_stream", "graylog_raw_sample_events", "graylog_mcp_call_timeout_seconds", "graylog_mcp_poll_timeout_seconds", "baseline_retention_days", "baseline_value_retention_days", "baseline_max_values_per_field", "baseline_training_days", "profile_advisor_timeout", "threat_intel_daily_limit", "threat_intel_ttl_seconds", "threat_intel_error_ttl_seconds", "abuseipdb_max_age_days"}:
|
||||
try:
|
||||
minimum = 60 if key == "graylog_range_seconds" else 1
|
||||
minimum = 60 if key in {"graylog_range_seconds", "graylog_mcp_poll_timeout_seconds"} else 1
|
||||
current[key] = max(minimum, int(value))
|
||||
except (TypeError, ValueError):
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user