2024-01-31 06:24:43
If you ever wanted to retry a single function/method call without any loops or decorators, check out stamina 24.2.0: #Python
If you ever wanted to retry a single function/method call without any loops or decorators, check out stamina 24.2.0: #Python
sometimes the right answer is to slap a retry on it
#systemd
what is the typical design process for multiple token buckets?
e.g. if you have a bunch of go routines that:
listen to new domain registrations ->
check for IP token bucket (or rough /30 bucket?) -> if rate limited, stack in list of things to do in that prefix?? send to disk?
check for ASN token bucket - if cidr range is unknown, send to ASN querying and sleep(?)
ASN querying go routine -> rate limited to a request every 8 hours (100/month), or every 2-ish hours (500/month) - cached once known
when ASN becomes unblocked -> /now/ you can query the domain
(this also applies to queue design in general, when the thing you're queuing for might take a long while to dequeue in breadth first search, or if you have multiple rate limits to respect)
e.g., if I have it run an insert into "asn_lookups_resume_domains" for the ASN job to lookup, then resume/retry the domain jobs
or if it's completely blocking
or if it's just n-workers such that probably some prefixes are unblocked
There must be lots of people upgrading Mastodon right now... I got a failed build with a 503 Service Unavailable from the docker registry. 😎
(Succeeded on retry...)
TIL that there's retry() helper in #Laravel :ablobsmile:
https://laravel.com/docs/10.x/helpers#method-retry