Skip to content

Commit 1138fd5

Browse files
authored
Print rate limit remaining (#157)
1 parent 15c47c8 commit 1138fd5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

miss_islington/__main__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ async def main(request):
3838
# Give GitHub some time to reach internal consistency.
3939
await asyncio.sleep(1)
4040
await router.dispatch(event, gh)
41+
try:
42+
print(f"GH requests remaining: {gh.rate_limit.remaining}")
43+
except AttributeError:
44+
pass
4145
return web.Response(status=200)
4246
except Exception as exc:
4347
traceback.print_exc(file=sys.stderr)

0 commit comments

Comments
 (0)