🐛 fix: rate.py variable scope

This commit is contained in:
一只瓜 2021-04-21 18:36:47 +08:00 committed by GitHub
parent e8153dea62
commit 617f80f687
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,6 +44,7 @@ async def refresher(context):
if time.time() - last_init > 24 * 60 * 60:
# we'd better do this to prevent ruining the log file with massive fail logs
# as this `refresher` would be called frequently
global last_init
last_init = time.time()
try:
init()