Raccolta: 429 del CDN come rallentamento, attese crescenti e recupero dei falliti, storico e seguiti senza pagina di ripresa, lacuna sotto la prima pagina, eliminazioni durante lo scaricamento (regole-3, cdn-429, dl-1, post-loop, walk-1, check-1, scroll-1, reader-1, h9-1, ring-1, library-2, dedup-1, tmp-1, budget-1, regole-4, kind-1, vocab-1)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mzbb6zeFTjT6Rp8b92AVkA
This commit is contained in:
28 files changed
+2619
-200
No files matched your search
@@ -38,6 +38,12 @@ public sealed class SiteControl
|
||||
/// <summary>Validity of the CDN addresses handed out from now on.</summary>
|
||||
public TimeSpan AddressLifetime { get; set; } = TimeSpan.FromHours(6);
|
||||
|
||||
/// <summary>The CDN answers 429 to every file (Rallentamento from the CDN, spec §7.6).</summary>
|
||||
public bool CdnTooManyRequests { get; set; }
|
||||
|
||||
/// <summary>Number of CDN requests answered with 429.</summary>
|
||||
public int CdnThrottled => _cdnThrottled;
|
||||
|
||||
/// <summary>Paths with query of every data request, in arrival order (for the tests).</summary>
|
||||
public IReadOnlyList<string> DataRequests => [.. _dataRequests];
|
||||
|
||||
@@ -49,6 +55,7 @@ public sealed class SiteControl
|
||||
|
||||
private int _cdnFiles;
|
||||
private int _cdnExpired;
|
||||
private int _cdnThrottled;
|
||||
|
||||
public StopMode Mode
|
||||
{
|
||||
@@ -83,8 +90,10 @@ public sealed class SiteControl
|
||||
_dataRequests.Clear();
|
||||
StoryDuration = TimeSpan.FromSeconds(5);
|
||||
AddressLifetime = TimeSpan.FromHours(6);
|
||||
CdnTooManyRequests = false;
|
||||
Interlocked.Exchange(ref _cdnFiles, 0);
|
||||
Interlocked.Exchange(ref _cdnExpired, 0);
|
||||
Interlocked.Exchange(ref _cdnThrottled, 0);
|
||||
}
|
||||
|
||||
public void ClearRequests() => _dataRequests.Clear();
|
||||
@@ -108,4 +117,6 @@ public sealed class SiteControl
|
||||
internal void OnCdnServed() => Interlocked.Increment(ref _cdnFiles);
|
||||
|
||||
internal void OnCdnExpired() => Interlocked.Increment(ref _cdnExpired);
|
||||
|
||||
internal void OnCdnThrottled() => Interlocked.Increment(ref _cdnThrottled);
|
||||
}
|
||||
Reference in new issue
Block a user