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

[Paranoia] Make EDSM plugin aware of any API limits #662

Open
Athanasius opened this issue Aug 4, 2020 · 2 comments · Fixed by #2144
Open

[Paranoia] Make EDSM plugin aware of any API limits #662

Athanasius opened this issue Aug 4, 2020 · 2 comments · Fixed by #2144
Assignees
Labels
EDSM enhancement Plugins Anything related to plugins Staged Feature Complete and in Testing for Next Release
Milestone

Comments

@Athanasius
Copy link
Contributor

Athanasius commented Aug 4, 2020

I don't think the player API on EDSM actually implements rate limiting.

Presumably if Anthor ever did it would be the same 'leaky bucket' he uses on the non-player endpoints.

So, out of paranoia, let's make the EDSM plugin aware of those headers and do something about them, even if it's only log if the bucket gets near empty.

i.e. on the systems API:

curl --verbose 'https://www.edsm.net/api-v1/systems?systemName=Sol'
...
< x-rate-limit-limit: 360
< x-rate-limit-remaining: 359
< x-rate-limit-reset: 10
...
@Athanasius Athanasius added enhancement Plugins Anything related to plugins labels Aug 4, 2020
@Athanasius
Copy link
Contributor Author

As part of this we can also make this work more like the Inara API code in its plugin, but instead of a straight up timer we pay attention to the limits instead, meaning in many cases we could just send events immediately.

@Athanasius Athanasius added this to the 5.3.0 milestone Aug 8, 2021
@Athanasius Athanasius added this to Pending in Enhancement Tracker Feb 8, 2022
@Athanasius Athanasius removed this from the 5.7.0 milestone Feb 8, 2022
@Rixxan Rixxan modified the milestones: Pre-6.0 Changes, 5.10.1 Dec 21, 2023
@Rixxan Rixxan self-assigned this Dec 27, 2023
@Rixxan
Copy link
Contributor

Rixxan commented Dec 27, 2023

Took a whack at this one in 0c2134c. Will need to test this when I'm back from holiday to make sure it didn't break all the things.

@Rixxan Rixxan moved this from Pending to In Progress in Enhancement Tracker Dec 27, 2023
@Rixxan Rixxan linked a pull request Jan 16, 2024 that will close this issue
@C1701D C1701D added the Staged Feature Complete and in Testing for Next Release label Jan 16, 2024
@Rixxan Rixxan added Staged Feature Complete and in Testing for Next Release and removed help wanted labels Jan 16, 2024
@Rixxan Rixxan modified the milestones: 5.10.x, 5.11.0 Mar 4, 2024
@Rixxan Rixxan moved this from In Progress to Complete in Enhancement Tracker Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EDSM enhancement Plugins Anything related to plugins Staged Feature Complete and in Testing for Next Release
Projects
3 participants