flip from start-bits to webclient. remove unused param - resolves #119 - #120
Conversation
|
Nick Horvath (@nickhorvath) Hey! Just tried this locally: And I get this error: See my comment in the code for what I believe the issue is. Thanks a ton for the contribution! =) |
| } | ||
| } | ||
|
|
||
| Start-BitsTransfer -Source $downloadSource -Destination $downloadDest |
There was a problem hiding this comment.
This is actually downloading multiple objects in one call as Start-BitsTransfer can take a list for the source/destination. I think you'll need to update the surrounding context a bit for this code to maybe kick all the downloads and then wait on them or iterate over them and sync download them one at a time.
There was a problem hiding this comment.
I think it would be good to see if we can determine if Bits is unable to run and have WebClient as the fallback too. Bits does run faster than WebClient, if available.
There was a problem hiding this comment.
Can you point to the data on the speed difference Robert Onulak (@Ziugy) ?
There was a problem hiding this comment.
Only looked up a single data point before. Here's the first site I saw: https://blog.jourdant.me/post/3-ways-to-download-files-with-powershell
...though looking back at the numbers here 1 second seems insignificant.
Found another showing multiple other options with different results: https://powershellone.wordpress.com/2015/10/27/review-of-methods-to-download-files-using-powershell
There was a problem hiding this comment.
in the end you guys let me know - i agree the sequential nature of downloading would be slower, but i'm not sure how often multiple installers are pulled.. for us it'll always be 1.
|
I've tested with the following scenarios: multiple installers |
Josh Wittner (jwittner)
left a comment
There was a problem hiding this comment.
Please bump the version to 5.0 as this changes the public API.
start-bits doesn't work on VSTS build agents. Webclient calls do.