Skip to content

Add retry to coursebook scraper#155

Draft
justinschwerdtfeger wants to merge 10 commits intodevelopfrom
coursebook-retry
Draft

Add retry to coursebook scraper#155
justinschwerdtfeger wants to merge 10 commits intodevelopfrom
coursebook-retry

Conversation

@justinschwerdtfeger
Copy link
Copy Markdown
Contributor

This PR was moved from a fork to a branch

This PR aims to add retry for the coursebook scraper. It's mostly intended for network errors, so scraping can continue even if something goes wrong. it aims to use user-provided flags to control some error handling logic (retry count, retry wait time, retry on panic).

Nothing in coursebook.go should execute log.fatal anymore. In most cases, this PR just returns the error until it reaches main, where we can add some recovery logic based on user-provided flags

All log.Fatals are removed and most are swapped with log.Panic as log.Fatal is not recoverable.

In addition, more instances of exponential backoff for network-related issues have been added, along with a generic retry for any other errors.

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.

1 participant