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

Avoid waking up ServiceInfo listeners when there is no new data #1068

Merged
merged 14 commits into from May 6, 2022

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented May 5, 2022

  • Currently we release the async_wait when we remove or update
    records but the listener only cares about new records non-nsec so we
    release and then wait again most of the time.

@bdraco
Copy link
Member Author

bdraco commented May 5, 2022

Need to clean this up and add tests for it

@bdraco bdraco closed this May 5, 2022
@bdraco bdraco reopened this May 5, 2022
@codecov-commenter
Copy link

codecov-commenter commented May 5, 2022

Codecov Report

Merging #1068 (9a35212) into master (5fb0954) will decrease coverage by 0.11%.
The diff coverage is 96.15%.

@@            Coverage Diff             @@
##           master    #1068      +/-   ##
==========================================
- Coverage   99.92%   99.80%   -0.12%     
==========================================
  Files          23       23              
  Lines        2542     2557      +15     
  Branches      473      478       +5     
==========================================
+ Hits         2540     2552      +12     
- Misses          1        2       +1     
- Partials        1        3       +2     
Impacted Files Coverage Δ
zeroconf/_logger.py 100.00% <ø> (ø)
zeroconf/_core.py 99.29% <83.33%> (-0.71%) ⬇️
zeroconf/_cache.py 100.00% <100.00%> (ø)
zeroconf/_handlers.py 100.00% <100.00%> (ø)
zeroconf/_services/browser.py 100.00% <100.00%> (ø)
zeroconf/_services/info.py 100.00% <100.00%> (ø)

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 5fb0954...9a35212. Read the comment docs.

@bdraco bdraco force-pushed the notify_only_add branch 2 times, most recently from b34f653 to 8b6f7a7 Compare May 5, 2022 16:43
bdraco added 12 commits May 6, 2022 11:26
- Currently we release the async_wait when we remove or update
  records but the listener only cares about new records non-nsec so we
  release and then wait again most of the time.
@bdraco bdraco changed the title Only notify when we add new records Avoid waking up ServiceInfo listeners when there is no need data May 6, 2022
@bdraco bdraco changed the title Avoid waking up ServiceInfo listeners when there is no need data Avoid waking up ServiceInfo listeners when there is no new data May 6, 2022
@bdraco bdraco marked this pull request as ready for review May 6, 2022 16:56
@bdraco bdraco merged commit 59624a6 into python-zeroconf:master May 6, 2022
@bdraco bdraco deleted the notify_only_add branch May 6, 2022 16:56
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