Skip to content

Commit

Permalink
Fixing rate limiter, lowering default openroutes rpm
Browse files Browse the repository at this point in the history
  • Loading branch information
arnasbr committed Sep 24, 2024
1 parent 139ff42 commit 9eb722b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/traveltime_google_comparison/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
DEFAULT_TOMTOM_RPM = 60
DEFAULT_HERE_RPM = 60
DEFAULT_OSRM_RPM = 60
DEFAULT_OPENROUTES_RPM = 60
DEFAULT_OPENROUTES_RPM = 20
DEFAULT_MAPBOX_RPM = 60
DEFAULT_TRAVELTIME_RPM = 60

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class OpenRoutesRequestHandler(BaseRequestHandler):

def __init__(self, api_key, max_rpm):
self.api_key = api_key
self._rate_limiter = AsyncLimiter(max_rpm // 60, 1)
self._rate_limiter = AsyncLimiter(max_rpm, 60)

async def send_request(
self,
Expand Down

0 comments on commit 9eb722b

Please sign in to comment.