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

Sleep after every download #50

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mariuszskon
Copy link

This is ensures we consistently perform a sleep regardless what categories we download.

Naively fixes #49.

@niklasb
Copy link
Owner

niklasb commented Jun 25, 2021

can you provide a rationale for this change? what effect are we trying to avoid here?

@mariuszskon
Copy link
Author

In short I'm trying to avoid return code 1 when doing ./get launchpad. Launchpad is the only one suffering from this error (debian might but all downloads succeed).

@niklasb
Copy link
Owner

niklasb commented Jun 25, 2021

@mariuszskon sure but why does sleeping help? I'd understand if you would introduce some kind of retry mechanism with a back-off, but 100ms seems like some magic value

@mariuszskon
Copy link
Author

mariuszskon commented Jun 25, 2021

I'm not 100% sure but I believe the sleep return code is used which leads to 0.
I agree the 100ms is a magic value, but I saw it in all the other get_all_* functions.

@mariuszskon
Copy link
Author

To clarify, I don't think this is a great solution either, but I saw the sleep .1 in the other functions and it has the desired side effect of having a zero return code.
I want #49 solved, this is perhaps not the way to do it.

@niklasb
Copy link
Owner

niklasb commented Jun 29, 2021

I'm not 100% sure but I believe the sleep return code is used which leads to 0.

I don't think that's accurate. So it's not an obvious fix for me. will have to look at the actual error case.

@peace-maker
Copy link
Collaborator

peace-maker commented Sep 3, 2021

Do we even have a consistent exit code set for the downloads? I mean, there has been an error, so a non-null exit code would be fine - but we've ignored that error and continued downloading other packages.

Maybe just adding an exit 0 at the end of the get script does the trick? Otherwise reducing the set of ubuntu versions tracked by the launchpad downloader would work too, to exclude some really old versions.

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.

Non-zero return code for launchpad (and possibly debian)
3 participants