Skip to content

Commit

Permalink
fix(ratelimit): 对齐 current_day
Browse files Browse the repository at this point in the history
  • Loading branch information
lss233 authored Sep 8, 2023
1 parent e6bfabc commit a57767c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions manager/ratelimit.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def get_draw_usage(self, _type: str, _id: str) -> Document:
q = Query()
usage = self.draw_usage_db.get(q.fragment({"type": _type, "id": _id}))
current_time = time.localtime(time.time()).tm_hour
current_day = time.localtime(time.time()).tm_mday

# 删除过期的记录
if usage is not None and usage['time'] != current_time:
Expand Down

0 comments on commit a57767c

Please sign in to comment.