Hey, how can i manually decrease a `rate_limit` in...
# ask-community
m
Hey, how can i manually decrease a
rate_limit
in my flow by one slot?
n
hi @Michael - have you tried going to
Configuration > Concurrency
in the UI and finding your concurrency limit? you should be able to decrease the limit there - or are you looking for something else?
m
Hi @Nate I am looking for some API that I can directly use in my flows. Background: I am using conditional requests for talking to the GitHub API. The API tells me in the response if the content was changed (and thus my request counts against the rate limit or not). But at this point I have already consumed a slot of the rate limit in prefect. Code:
Copy code
rate_limit(RATE_LIMIT_GITHUB_NAME) 
response= httpx.get(final_url,headers=headers)

if response.status_code == 304: 
   # This doesn't count against GitHub's rate limit
   # I need to decrease the limit by one slot
else:
   # This does!