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

refactor(sdk): release lock after discovery complete #624

Merged
merged 1 commit into from
Oct 11, 2020

Conversation

chr1shung
Copy link

Add a wrapper function to call discovery.Discovery() and release the
lock when call completed so that developer will not be forced to push
something to deviceCh to release the lock

Signed-off-by: Chris Hung chris@iotechsys.com

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Issue Number:
fix #609

@codecov-io
Copy link

Codecov Report

Merging #624 into master will increase coverage by 0.33%.
The diff coverage is 43.09%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #624      +/-   ##
==========================================
+ Coverage   53.58%   53.91%   +0.33%     
==========================================
  Files          24       23       -1     
  Lines        2831     2552     -279     
==========================================
- Hits         1517     1376     -141     
+ Misses       1198     1063     -135     
+ Partials      116      113       -3     
Impacted Files Coverage Δ
internal/autoevent/manager.go 0.00% <0.00%> (ø)
internal/cache/devices.go 96.96% <ø> (+1.78%) ⬆️
internal/cache/provisionwatchers.go 95.45% <ø> (+2.68%) ⬆️
internal/cache/valuedescriptors.go 100.00% <ø> (+3.12%) ⬆️
internal/common/config.go 0.00% <0.00%> (ø)
internal/common/types.go 0.00% <0.00%> (ø)
internal/common/utils.go 17.00% <0.00%> (-2.18%) ⬇️
internal/handler/control.go 0.00% <0.00%> (ø)
internal/transformer/transformparam.go 0.00% <0.00%> (ø)
internal/clients/init.go 8.33% <5.33%> (+1.03%) ⬆️
... and 25 more

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 833c05b...1ad5bff. Read the comment docs.

Add a wrapper function to call discovery.Discovery() and release the
lock when call completed so that developer will not be forced to push
something to deviceCh to release the lock

fix edgexfoundry#609

Signed-off-by: Chris Hung <chris@iotechsys.com>
Copy link
Member

@cloudxxx8 cloudxxx8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cloudxxx8 cloudxxx8 merged commit d88b1cb into edgexfoundry:master Oct 11, 2020
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.

Discover function lock release issue
4 participants