Skip to content

Commit

Permalink
Fix display of rate limit timeout (#1045)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkZH authored Oct 27, 2024
1 parent c1e4327 commit 36b3a18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/lichess.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def set_rate_limit_delay(self, path_template: str, delay_time: datetime.timedelt
:param path_template: The path template.
:param delay_time: How long we won't call this endpoint.
"""
logger.warning(f"Endpoint {path_template} is rate limited. Waiting {delay_time} seconds until next request.")
logger.warning(f"Endpoint {path_template} is rate limited. Waiting {sec_str(delay_time)} seconds until next request.")
self.rate_limit_timers[path_template] = Timer(delay_time)

def is_rate_limited(self, path_template: str) -> bool:
Expand Down

0 comments on commit 36b3a18

Please sign in to comment.