diff options
| author | Bobby <[email protected]> | 2026-02-24 14:48:50 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2026-02-24 14:48:50 +0530 |
| commit | 17b77153a862ad1eb3babe1e34e748363ac9916c (patch) | |
| tree | 33871abe60da895112ebfffd5802f396005f7c79 /utils/api | |
| parent | efb4f68869a9e712c4016ef286d3f16b0bba3110 (diff) | |
| download | metachan-17b77153a862ad1eb3babe1e34e748363ac9916c.tar.xz metachan-17b77153a862ad1eb3babe1e34e748363ac9916c.zip | |
Refactor rate limiter: simplify implementation and improve token management
Diffstat (limited to 'utils/api')
| -rw-r--r-- | utils/api/jikan/jikan.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/api/jikan/jikan.go b/utils/api/jikan/jikan.go index 244253d..8812c5a 100644 --- a/utils/api/jikan/jikan.go +++ b/utils/api/jikan/jikan.go @@ -63,7 +63,7 @@ func (c *client) handleRetry(retries *int, url string, reason string, retryAfter backoffDuration = retryAfter } - logger.Warnf("JikanClient", "%s for %s (attempt %d/%d)", reason, url, *retries, c.maxRetries) + logger.Debugf("JikanClient", "%s for %s (attempt %d/%d)", reason, url, *retries, c.maxRetries) time.Sleep(backoffDuration) return true } @@ -288,7 +288,7 @@ func GetAnimeProducers() (*types.JikanProducersResponse, error) { response.Pagination = pageResponse.Pagination } - logger.Debugf("JikanClient", "Fetched page (%d/%d) - %d producers", page, response.Pagination.LastVisiblePage, len(pageResponse.Data)) + logger.Infof("JikanClient", "Fetched page (%d/%d) - %d producers", page, response.Pagination.LastVisiblePage, len(pageResponse.Data)) response.Data = append(response.Data, pageResponse.Data...) hasNextPage = pageResponse.Pagination.HasNextPage |
