From c3d9441370e9740a02834dbf1da849263a9075c3 Mon Sep 17 00:00:00 2001 From: Zed Date: Mon, 21 Aug 2023 14:49:50 +0200 Subject: [PATCH] Unify some guest account logs --- src/apiutils.nim | 2 +- src/tokens.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apiutils.nim b/src/apiutils.nim index 6e333e7..453b36a 100644 --- a/src/apiutils.nim +++ b/src/apiutils.nim @@ -138,7 +138,7 @@ proc fetch*(url: Uri; api: Api): Future[JsonNode] {.async.} = 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 + echo "[accounts] rate limited, api: ", api, ", reqs left: ", account.apis[api].remaining, ", id: ", account.id proc fetchRaw*(url: Uri; api: Api): Future[string] {.async.} = fetchImpl result: diff --git a/src/tokens.nim b/src/tokens.nim index 45aa895..a44866f 100644 --- a/src/tokens.nim +++ b/src/tokens.nim @@ -77,7 +77,7 @@ proc isLimited(account: GuestAccount; api: Api): bool = if limit.limited and (epochTime().int - limit.limitedAt) > dayInSeconds: account.apis[api].limited = false - echo "account limit reset, api: ", api, ", id: ", account.id + log "resetting limit, api: ", api, ", id: ", account.id return limit.limited or (limit.remaining <= 10 and limit.reset > epochTime().int) else: