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

Add: concurrent session requests eliminated #6

Merged

Conversation

joeybaker
Copy link

♻️ Current situation && 💡 Proposed solution

Fixes #4

This eliminates concurrent requests to the session API endpoint by caching the first request and returning it's result to subsequent calls as long as the request is still in flight. This should be a small help in avoiding rate-limiting.

⚙️ Release Notes

Added a little more defense against rate limiting by eliminating some concurrent requests to the August/Yale API

➕ Additional Information

If applicable, provide additional context in this section.

Testing

¯_(ツ)_/¯ I just translated what I had manually modified this package running in homebridge. It seems to have worked there.

Fixes donavanbecker#4

This eliminates concurrent requests to the `session` API endpoint by
caching the first request and returning it's result to subsequent calls
as long as the request is still in flight. This should be a small help
in avoiding rate-limiting.
@donavanbecker donavanbecker merged commit a6793cf into donavanbecker:beta-0.3.0 May 7, 2024
@donavanbecker
Copy link
Owner

Thanks!!!

@joeybaker joeybaker deleted the concurrentsession branch May 7, 2024 21:13
@donavanbecker donavanbecker mentioned this pull request May 8, 2024
donavanbecker added a commit that referenced this pull request May 8, 2024
## [1.0.0](https://github.com/donavanbecker/august-yale/tag/v1.0.0) (2024-05-07)

### What's Changed
- Add: concurrent session requests eliminated, Thanks [@joeybaker](https://github.com/joeybakerThanks), [#6](#6)
- Fix: let fetch errors bubble up, Thanks [@joeybaker](https://github.com/joeybakerThanks), [#5](#5)
- Housekeeping and updated dependencies.

**Full Changelog**: v0.2.0...v1.0.0
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.

None yet

2 participants