Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

✨ Implements Ratelimiter to prevent 429s from user scope #264

Merged
merged 14 commits into from
Nov 30, 2021

Conversation

Lunarmagpie
Copy link
Member

@Lunarmagpie Lunarmagpie commented Nov 28, 2021

Changes

  • adds: RATE LIMITING
    User scope is prevented by the ratelimiter. The shared scope is impossible to prevent according to some dude from the discord API server so I can ignore that one. I did not implement a way to prevent global rate limits in this PR.
    All logging is under Info scope. Someone say something if you think it should be under a different one.

Check off the following

  • I have tested my changes with the current requirements
  • My Code follows the pep8 code style.

@codecov
Copy link

codecov bot commented Nov 28, 2021

Codecov Report

Merging #264 (224c4cb) into main (072bf68) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #264   +/-   ##
=======================================
  Coverage   90.00%   90.00%           
=======================================
  Files           9        9           
  Lines         100      100           
=======================================
  Hits           90       90           
  Misses         10       10           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 072bf68...224c4cb. Read the comment docs.

@Lunarmagpie Lunarmagpie changed the title ✨ Implements Ratelimiter to prevent 429s from user requests ✨ Implements Ratelimiter to prevent 429s from user scope Nov 28, 2021
pincer/core/ratelimiter.py Outdated Show resolved Hide resolved
pincer/core/http.py Show resolved Hide resolved
pincer/core/ratelimiter.py Show resolved Hide resolved
@Lunarmagpie Lunarmagpie merged commit 529bf82 into Pincer-org:main Nov 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants