_DomainState
Index
Methods
apply_backoff
Block the domain for
delay.If no 429 arrives for another
delayafter the domain becomes dispatchable again, the exponent resets.Parameters
now: datetime
delay: timedelta
Returns None
apply_crawl_delay
Block the domain for its crawl-delay, if it declared one.
Parameters
now: datetime
Returns None
reset_throttling
Clear the transient throttle state.
Returns None
Properties
backoff_decays_at
Time after which an incoming 429 is treated as a fresh burst rather than a continuation of the current one.
backoff_until
Earliest time the next request is allowed by the 429 backoff. Kept apart from crawl_delay_until, which is
armed on every dispatch and would otherwise pass for an active backoff.
consecutive_429_count
Number of consecutive 429 responses (for exponential backoff).
crawl_delay
Minimum interval between requests, used to push crawl_delay_until on dispatch.
crawl_delay_until
Earliest time the next request is allowed by the domain's crawl-delay.
domain
The domain being tracked.
throttled_until
Earliest time the next request to this domain is allowed by either of its two independent clocks.
Tracks delay state for a single domain.