Bound the WHOIS fetcher's success and error time lists (closes #118) #143

Merged
clawbot merged 1 commits from issue-118-fetcher-stats into next 2026-10-20 03:38:52 +02:00
1 Commits
Author SHA1 Message Date
sneak fec7f8811f Bound the WHOIS fetcher's success and error time lists (closes #118)
check / check (push) Waiting to run
recordSuccess and recordFailure appended a time on every fetch, and only
GetStats, run when a stats endpoint is requested, dropped the times older
than statsWindow, so a daemon nobody polled kept every one. Each now drops
those times before it appends. The drop takes them off the front of the
list instead of copying the rest: the times are in the order they were
recorded, and it now runs on every fetch.

The fetcher reads the time through a now field so a test can set the
clock. The test records 100,000 successes and failures a second apart
without asking for the stats and finds one hour's worth of each kept.

Model: opus-5-5
2026-10-20 01:32:48 +00:00