Skip to content

Commit

Permalink
Add missing limitedAt assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
zedeus committed Aug 20, 2023
1 parent 3d8858f commit e8b5cbe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/apiutils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ proc fetch*(url: Uri; api: Api): Future[JsonNode] {.async.} =
raise rateLimitError()
elif errors in {rateLimited}:
account.apis[api].limited = true
account.apis[api].limitedAt = epochTime().int
echo "rate limited, api: ", $api, ", reqs left: ", account.apis[api].remaining, ", id: ", account.id

proc fetchRaw*(url: Uri; api: Api): Future[string] {.async.} =
Expand Down

0 comments on commit e8b5cbe

Please sign in to comment.