Skip to content

Commit

Permalink
Fixing rate limiter, lowering default openroutes rpm (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnasbr authored Sep 24, 2024
1 parent cb03819 commit b37a609
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 b37a609

Please sign in to comment.