przemyslawpluta / mongo-edu

Select and download videos and handouts from https://university.mongodb.com courses
MIT License
279 stars 83 forks source link

Retry attempts - Download gives up too quickly #64

Closed seanmavley closed 8 years ago

seanmavley commented 8 years ago

Really appreciate the resume download thing. Priceless!

However, I think the downloader gives up too quickly when it tries and can't get connection.

An optional parameter, like, mongo-edu -d . --retry 10 will be great.

I wouldn't mind setting my retries to 5 Million. Over 2 hours now, trying to download a course. Although it downloads fast enough, its unstable, and I have to be checking if it's ongoing or stopped

przemyslawpluta commented 8 years ago

What's the error you're getting?

seanmavley commented 8 years ago

That's the error. It appears to download from 433 instead of 80, so perhaps SSL things to causing drops in connection?

cursors introduction-XzNqJpImCP4.mp4. Done in: 29469.104ms i 8 left ... Error: getaddrinfo EAI_AGAIN r20---sn-4g57knzk.googlevideo.com:443 at Object.exports._errnoException (util.js:856:11) at errnoException (dns.js:31:15) at GetAddrInfoReqWrap.onlookup as oncomplete

przemyslawpluta commented 8 years ago

@seanmavley please post entire mongo-edu output from the beginning.

seanmavley commented 8 years ago

Please, here is it, the entire output for downloading the course:

http://pastebin.com/6uT0wjVj

thanks

przemyslawpluta commented 8 years ago

@seanmavley try latest version with an addition of --retry timeInSeconds. It's not on the npm yet so install it directly from git repo npm install przemyslawpluta/mongo-edu -g and let me know.

timeInSeconds indicates amount of time it tries to download if case of issues.

seanmavley commented 8 years ago

okay, I'm about to install. will let you know how it goes.

seanmavley commented 8 years ago

I tried it, and it didn't drop. Download continued till the end in peace. If it retries behind the scenes without any output in terminal to indicate its retrying, then that's amazing. It doesn't need to show a visual output, as long as it works perfectly behind the scenes with the --retry set.

With this added @przemyslawpluta , how about by default, a retry of say, 3 or 5? By the way, I leave closing this issue to you. It worked fined, unless I should do it.

thanks

przemyslawpluta commented 8 years ago

@seanmavley good to hear it. Yes it's all happening internally hence no info printed in the console don't think it's neccesery. Was thinking about default --retry value and probably will push it in the npm release. Thanks for testing.

seanmavley commented 8 years ago

It's such an amazing tool and saves time a lot. Thanks for the tool.

On Sat, Jan 9, 2016, 10:51 Przemyslaw Pluta notifications@github.com wrote:

@seanmavley https://github.com/seanmavley good to hear it. Yes it's all happening internally hence no info printed in the console don't think it's neccesery. Was thinking about default --retry value and probably will push it in the npm release. Thanks for testing.

— Reply to this email directly or view it on GitHub https://github.com/przemyslawpluta/mongo-edu/issues/64#issuecomment-170225103 .