Skip to content

Commit

Permalink
fix: increase git fetch time, prevent rate limit
Browse files Browse the repository at this point in the history
  • Loading branch information
pommee committed Jun 6, 2024
1 parent 279f17f commit 088773d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def on_mount(self) -> None:

if parse(last_fetch.version_fetched) > current_version:
# Fetch latest version if more than 20 minutes ago.
if time_since_last_fetch() > 0.1:
if time_since_last_fetch() > 20:
latest_version = get_latest_version()
if latest_version is not None:
if latest_version > current_version:
Expand Down Expand Up @@ -437,7 +437,7 @@ def update(force):
current_version = parse(get_current_version())
latest_version = None

if time_since_last_fetch() < 0.1 and not force:
if time_since_last_fetch() < 5 and not force:
print(
f"⚠️ {Fore.YELLOW}Updating too often might lead to being rate-limited.{Style.RESET_ALL}\n"
"Pass --force or -f to force update."
Expand Down

0 comments on commit 088773d

Please sign in to comment.