Add missing limitedAt assignment

This commit is contained in:
Zed 2023-08-20 12:31:08 +02:00
parent 3d8858f0d8
commit e8b5cbef7b
1 changed files with 1 additions and 0 deletions

View File

@ -137,6 +137,7 @@ proc fetch*(url: Uri; api: Api): Future[JsonNode] {.async.} =
raise rateLimitError() raise rateLimitError()
elif errors in {rateLimited}: elif errors in {rateLimited}:
account.apis[api].limited = true 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 echo "rate limited, api: ", $api, ", reqs left: ", account.apis[api].remaining, ", id: ", account.id
proc fetchRaw*(url: Uri; api: Api): Future[string] {.async.} = proc fetchRaw*(url: Uri; api: Api): Future[string] {.async.} =