diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-01-18 17:29:14 -0600 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2026-01-18 17:29:14 -0600 |
| commit | eb194eed9f24ec84077360558c1804e3f31d7485 (patch) | |
| tree | 0289de47e69f5e0c227a54b357c5e1c594618232 | |
| parent | d4734424e1c39033c2c69086138a9bd9714a71a2 (diff) | |
| download | slskd-eb194eed9f24ec84077360558c1804e3f31d7485.tar.gz | |
ensure options can be changed at run time
| -rw-r--r-- | src/slskd/Application.cs | 4 | ||||
| -rw-r--r-- | src/slskd/Core/Options.cs | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs index df7d4f3f..c68646da 100644 --- a/src/slskd/Application.cs +++ b/src/slskd/Application.cs @@ -1590,7 +1590,7 @@ namespace slskd search requests arrive very consistently at a rate of about 30 per second, so we have about ~33 milliseconds to process each request on average before we get into trouble. */ - if (IncomingSearchRequestQueueDepth > OptionsAtStartup.Throttling.Search.Incoming.CircuitBreaker) + if (IncomingSearchRequestQueueDepth > OptionsMonitor.CurrentValue.Throttling.Search.Incoming.CircuitBreaker) { Metrics.Search.Incoming.RequestsDropped.Inc(1); Metrics.Search.Incoming.CurrentRequestDropRate.CountUp(1); @@ -1642,7 +1642,7 @@ namespace slskd // see https://github.com/jpdillingham/Soulseek.NET/issues/803 var queryWithExclusionsApplied = new SearchQuery(terms: query.Terms, exclusions: query.Exclusions.Concat(ExcludedSearchPhrases).Distinct()); - var results = await Shares.SearchAsync(queryWithExclusionsApplied, limit: Options.Throttling.Search.Incoming.ResponseFileLimit); + var results = await Shares.SearchAsync(queryWithExclusionsApplied, limit: OptionsMonitor.CurrentValue.Throttling.Search.Incoming.ResponseFileLimit); var queryLatency = sw.ElapsedMilliseconds - filterLatency; Metrics.Search.Incoming.Query.Latency.Observe(queryLatency); diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs index 7021f808..200b0ee8 100644 --- a/src/slskd/Core/Options.cs +++ b/src/slskd/Core/Options.cs @@ -1509,7 +1509,6 @@ namespace slskd [Argument(default, "throttling-search-incoming-circuit-breaker")] [EnvironmentVariable("THROTTLING_SEARCH_INCOMING_CIRCUIT_BREAKER")] [Range(100, 10000)] - [RequiresRestart] public int CircuitBreaker { get; init; } = 500; /// <summary> |
