As part of a data flow, I'd like to download a list of files at 10 request / second.
Is sleeping the thread as as done here the best approach?
case ExRated.check_rate(@endpoint, scale, limit) do
{:ok, _} ->
request.()
{:error, _} ->
:timer.sleep(1_000)
rate_limit_access(request, opts)
end
Is it possible to do something like what's done with gen_stage
here, or what's the best approach to rate limit sections using Flow
?