Adam Bell :catPOWER: on Nostr: Does anyone have recs for handling fetching multiple URL requests serially with ...
Does anyone have recs for handling fetching multiple URL requests serially with async/await but also abiding by rate limiting (i.e. limiting requests to only being done once every 0.2s).
I had it done with a TaskGroup, but that fires off all the requests in parallel.
I also tried this where I set a minimum timeout for each request and then delaying tasks, executing tasks via an AsyncSequence… but that just feels wrong. I thought I could use throttle() but that ends up just dropping events
I had it done with a TaskGroup, but that fires off all the requests in parallel.
I also tried this where I set a minimum timeout for each request and then delaying tasks, executing tasks via an AsyncSequence… but that just feels wrong. I thought I could use throttle() but that ends up just dropping events