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 skipped announces back to queue #167

Merged
merged 4 commits into from
May 31, 2019
Merged

Add skipped announces back to queue #167

merged 4 commits into from
May 31, 2019

Conversation

codygibb
Copy link
Contributor

@codygibb codygibb commented May 30, 2019

If a torrent is at capacity, we skip announcing that torrent. However, we were not re-adding
that torrent back to the announce queue, so it wouldn't announce again until it was completed.
In practice, if a torrent is at capacity it will very likely be completed, so this bug went by
unnoticed for a long time.

Now, we skip all torrents that are at capacity until we reach a torrent we want to announce.
Then we re-enqueue all the skipped torrents.

@codygibb
Copy link
Contributor Author

cc @mmpei

@codecov-io
Copy link

codecov-io commented May 31, 2019

Codecov Report

Merging #167 into master will increase coverage by 0.12%.
The diff coverage is 86.95%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #167      +/-   ##
=========================================
+ Coverage   67.28%   67.4%   +0.12%     
=========================================
  Files         179     179              
  Lines        8743    8754      +11     
=========================================
+ Hits         5883    5901      +18     
+ Misses       2116    2111       -5     
+ Partials      744     742       -2
Impacted Files Coverage Δ
lib/torrent/scheduler/dispatch/dispatcher.go 53.07% <100%> (+0.47%) ⬆️
lib/torrent/scheduler/events.go 72.72% <86.36%> (+4.38%) ⬆️

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 4fd3753...32e3307. Read the comment docs.

@codygibb codygibb merged commit 16efa07 into master May 31, 2019
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

3 participants