Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: store redgifs token to avoid hitting rate limit #1302

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

yadue
Copy link
Contributor

@yadue yadue commented Jan 31, 2024

Redgifs started to throw 429 Rate limit when requesting to often to temporary token. This PR stores it in variable and reuses it.

@yadue yadue force-pushed the feature/redgifs-cache-token branch from 69cad8f to 7674465 Compare February 2, 2024 08:29
Copy link

sonarqubecloud bot commented Feb 2, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@extesy
Copy link
Owner

extesy commented Feb 4, 2024

@yadue I don't think this will make any difference. The token is only requested once per prepareImgLinks call which only happens on page load.

@yadue
Copy link
Contributor Author

yadue commented Feb 5, 2024

@extesy I wouldn't work on this fix if it wasn't required. New reddit has "infinite scroll" and with each next page load it triggers prepareImgLinks to run. It requires just couple of runs for redgifs to throw 429.

@extesy extesy merged commit 018d24a into extesy:master Feb 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants