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

Retry support and additional fixes #743

Merged
merged 15 commits into from
Jan 26, 2025
Merged

Retry support and additional fixes #743

merged 15 commits into from
Jan 26, 2025

Conversation

ikreymer
Copy link
Member

@ikreymer ikreymer commented Jan 18, 2025

  • retries: for failed pages, set retry to 5 in cases multiple retries may be needed.
  • redirect: if page url is /path/ -> /path, don't add as extra seed
  • proxy: don't use global dispatcher, pass dispatcher explicitly when using proxy, as proxy may interfere with local network requests
  • final exit flag: if crawl is done and also interrupted, ensure WACZ is still written/uploaded by setting final exit to true
  • hashtag only change force reload: if loading page with same URL but different hashtag, eg. https://example.com/#B after https://example.com/#A, do a full reload

- redirect: if page url is /path/ -> /path, don't add as extra seed
- proxy: don't use global dispatcher, pass dispatcher explicitly when using proxy
@ikreymer ikreymer requested a review from tw4l January 18, 2025 10:37
@ikreymer ikreymer changed the title Additional fixes Retry support and additional fixes Jan 21, 2025
… list

tests: add test for retry, ensure all retries are used
@ikreymer ikreymer marked this pull request as ready for review January 21, 2025 21:47
@ikreymer ikreymer merged commit f7cbf96 into main Jan 26, 2025
4 checks passed
@ikreymer ikreymer deleted the proxy-redir-fixes branch January 26, 2025 06:55
@ikreymer ikreymer mentioned this pull request Feb 6, 2025
ikreymer added a commit that referenced this pull request Feb 7, 2025
- follow up to #743
- page retries are simply added back to the same queue with `retry`
param incremented and a higher scope, after extraHops, to ensure retries
are added at the end.
- score calculation is: `score = depth + (extraHops * MAX_DEPTH) +
(retry * MAX_DEPTH * 2)`, this ensures that retries have lower priority
than extraHops, and additional retries even lower priority (higher
score).
- warning is logged when a retry happens, error only when all retries
are exhausted.
- back to one failure list, urls added there only when all retries are
exhausted.
- rename --numRetries -> --maxRetries / --retries for clarity
- state load: allow retrying previously failed URLs if --maxRetries is
higher then on previous run.
- ensure working with --failOnFailedStatus, if provided, invalid status
codes (>= 400) are retried along with page load failures
- fixes #132

---------

Co-authored-by: Tessa Walsh <[email protected]>
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.

2 participants