mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 16:33:27 +00:00
chore(quartz): drop AdaptiveRelayLimiter + relay-URL rejection logs to debug
The per-relay concurrency/rate throttle notices and the "Rejected <url>" normalizer messages fire constantly during a large crawl (thousands of rejected/throttled relays) and are operational detail, not warnings. Move them from Log.w to Log.d so they stay available under debug logging without flooding a normal run. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RWk2ZMrGBSr4WenKgwqmbB
This commit is contained in:
+2
-2
@@ -150,7 +150,7 @@ class AdaptiveRelayLimiter(
|
||||
val cap = subLadder[(step - 1).coerceIn(0, subLadder.size - 1)]
|
||||
gate(relay).lower(cap)
|
||||
if (step <= subLadder.size) {
|
||||
Log.w("AdaptiveRelayLimiter") { "${relay.url} concurrency capped at $cap subs (sub-limit #$step)" }
|
||||
Log.d("AdaptiveRelayLimiter") { "${relay.url} concurrency capped at $cap subs (sub-limit #$step)" }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ class AdaptiveRelayLimiter(
|
||||
val d = rateLadder[(step - 1).coerceIn(0, rateLadder.size - 1)]
|
||||
rateDelayMs[relay] = d
|
||||
if (step <= rateLadder.size) {
|
||||
Log.w("AdaptiveRelayLimiter") { "${relay.url} rate-throttled to 1 REQ / ${d}ms (rate-limit #$step)" }
|
||||
Log.d("AdaptiveRelayLimiter") { "${relay.url} rate-throttled to 1 REQ / ${d}ms (rate-limit #$step)" }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -156,7 +156,7 @@ class RelayUrlNormalizer {
|
||||
|
||||
if (trimmed.contains("://")) {
|
||||
// some other scheme we cannot connect to.
|
||||
Log.w("RelayUrlNormalizer") { "Rejected $url" }
|
||||
Log.d("RelayUrlNormalizer") { "Rejected $url" }
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -189,14 +189,14 @@ class RelayUrlNormalizer {
|
||||
normalizedUrls.put(url, NormalizationResult.Success(normalized))
|
||||
normalized
|
||||
} else {
|
||||
Log.w("NormalizedRelayUrl") { "Rejected $url" }
|
||||
Log.d("NormalizedRelayUrl") { "Rejected $url" }
|
||||
normalizedUrls.put(url, NormalizationResult.Error)
|
||||
null
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
if (e is CancellationException) throw e
|
||||
normalizedUrls.put(url, NormalizationResult.Error)
|
||||
Log.w("NormalizedRelayUrl") { "Rejected $url" }
|
||||
Log.d("NormalizedRelayUrl") { "Rejected $url" }
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user