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

Implement progressive backoff and improve error reporting #126

Merged
merged 1 commit into from
Feb 13, 2022

Conversation

bdraco
Copy link
Contributor

@bdraco bdraco commented Feb 13, 2022

We needed to wait a little bit longer for the OSError's to come back so we now backoff progressively up to 3s between sends and increases the timeout to 13s since it can take a few more seconds for error to arrive. This means we now get a much better error when the bulb is offline, and we aren't making a situation where the problem is wifi congestion even worse.

Also since we are using a future, it doesn't matter which udp message the bulb gets and respond to, since as soon as it does, the send task will be canceled and we will declare success.

Screen Shot 2022-02-13 at 09 04 10

Screen Shot 2022-02-13 at 09 04 04

@codecov-commenter
Copy link

codecov-commenter commented Feb 13, 2022

Codecov Report

Merging #126 (c06e767) into master (ed71ae3) will increase coverage by 0.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #126      +/-   ##
==========================================
+ Coverage   87.34%   87.43%   +0.09%     
==========================================
  Files          12       12              
  Lines         782      788       +6     
==========================================
+ Hits          683      689       +6     
  Misses         99       99              
Impacted Files Coverage Δ
pywizlight/bulb.py 89.84% <100.00%> (+0.16%) ⬆️

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 ed71ae3...c06e767. Read the comment docs.

@bdraco bdraco changed the title Implement backoff and improve error reporting Implement progressive backoff and improve error reporting Feb 13, 2022
@sbidy sbidy merged commit 2e1c03b into sbidy:master Feb 13, 2022
@bdraco
Copy link
Contributor Author

bdraco commented Feb 13, 2022

It would be good to get a release for this one.

@sbidy
Copy link
Owner

sbidy commented Feb 13, 2022

0.5.7 on the way

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.

3 participants