assistant: Be smarter about avoiding unncessary transfers.

Just before starting a transfer, do one last check that it's still
preferred content.

I was just doing this for uploads, as part of the smarter flood filling
bug, but realized it's also possible for a download that was preferred
content to change to not be before the download begins, so check that too.
This commit is contained in:
Joey Hess 2013-03-13 13:36:02 -04:00
parent 60760cb430
commit 02facde154
3 changed files with 35 additions and 12 deletions

View file

@ -12,7 +12,9 @@ this.
1. Ensure that locally paired computers have a lower cost than network
transfer remotes.
2. When queuing uploads, queue transfers to the lowest cost remotes first.
(already done)
3. Just before starting a transfer, re-check if the transfer is still wanted.
(done)
Now, unnecessary transfers to tranfer repos are avoided if it can send
the file locally instead.