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

NXDRIVE-2083: Use dict.copy() for thread safety, better atomicity spe… #1860

Merged
merged 2 commits into from Jul 17, 2020

Conversation

BoboTiG
Copy link
Contributor

@BoboTiG BoboTiG commented Jul 17, 2020

@BoboTiG BoboTiG added the bugfix label Jul 17, 2020
@nuxeojenkins
Copy link
Contributor

View issues in JIRA:

  • NXDRIVE-2223: Select Web UI by default in Settings
  • NXDRIVE-2083: Use dict.copy() for thread safety, better atomicity speed and memory efficiency

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jul 17, 2020

Sourcery Code Quality Report (beta)

Merging this PR leaves code quality unchanged.

Before After Change
Quality 8.49 8.49 0.0
Complexity 4.46 4.46 0.0
Method Length 63.05 63.05 0.0
Lines 3256 3255 -1
Changed files Quality Before Quality After Quality Change
nxdrive/manager.py 8.85 8.85 0.0
nxdrive/engine/queue_manager.py 8.49 8.49 0.0
nxdrive/engine/watcher/local_watcher.py 7.71 7.71 0.0
nxdrive/updater/base.py 8.26 8.26 0.0
tests/functional/test_server_options.py 9.02 9.02 0.0

Here are some functions in these files that still need a tune-up:

File Function Quality Recommendation
nxdrive/engine/watcher/local_watcher.py LocalWatcher._scan_recursive 0.01 Reduce complexity. Split out functionality
nxdrive/engine/watcher/local_watcher.py LocalWatcher.handle_watchdog_event 0.05 Reduce complexity. Split out functionality
nxdrive/engine/watcher/local_watcher.py LocalWatcher._handle_watchdog_event_on_known_acquired_pair 2.01 Reduce complexity. Split out functionality
nxdrive/manager.py Manager.__init__ 2.73 Split out functionality
nxdrive/engine/watcher/local_watcher.py LocalWatcher._handle_move_on_known_pair 3.03 Split out functionality

Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Let us know what you think of it via email or our Gitter!

@BoboTiG BoboTiG merged commit d1de491 into master Jul 17, 2020
@BoboTiG BoboTiG deleted the wip-NXDRIVE-2083-improve-thread-safety branch July 17, 2020 16:05
@BoboTiG BoboTiG added this to the 4.4.5 milestone Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants