Skip to content

Commit

Permalink
Merge pull request #193 from ya0guang/patch-1
Browse files Browse the repository at this point in the history
fix f-string of retry
  • Loading branch information
pluwen authored Apr 1, 2024
2 parents 3d79e53 + 28c9300 commit ba4f949
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/add_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ async def check_status(session, key, retry=10):
if resp.status == 404:
return (key, 'D', app_name)
rand = round(random.random(), 3)
print(f"[warn] {e}, wait {i*(rand+1)+1} s. Retry({i}/retry)")
print(f"[warn] {e}, wait {i*(rand+1)+1} s. Retry({i}/{retry})")
await asyncio.sleep(i*(rand+1)+1)
print(f"[warn] Key ({key}) have max retries, return default value!")
return (key, status, app_name)
Expand Down Expand Up @@ -164,4 +164,4 @@ async def main():
os.chdir(sys.path[0])

loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.run_until_complete(main())

0 comments on commit ba4f949

Please sign in to comment.