atproto relay implementation in zig zlay.waow.tech

fix: reset host status and failures on requestCrawl

when requestCrawl re-validates an exhausted host via describeServer,
reset its status to 'active' and clear failed_attempts. without this,
exhausted hosts accumulate failures across cronjob cycles and
immediately re-exhaust on a single connection failure.

909 of 3140 tracked hosts were stuck in 'exhausted' state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+6
+6
src/slurper.zig
··· 414 414 return; 415 415 }; 416 416 417 + // reset status and failure count — host passed describeServer, give it a fresh start. 418 + // without this, exhausted hosts accumulate failures across requestCrawl cycles 419 + // and immediately re-exhaust on a single failure. 420 + self.persist.updateHostStatus(host_info.id, "active") catch {}; 421 + self.persist.resetHostFailures(host_info.id) catch {}; 422 + 417 423 try self.spawnWorker(host_info.id, hostname); 418 424 log.info("added host {s} (id={d})", .{ hostname, host_info.id }); 419 425 }