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

RootPathMiddleware: Combine into multiple packages #1029

Merged
merged 6 commits into from Oct 5, 2023

Conversation

jpmckinney
Copy link
Member

@jpmckinney jpmckinney commented Oct 4, 2023

I'm copying some logic from ResizePackage to RootPath, but noticed some things to fix/improve.

…ven if sample is set. Avoid JSON encoding (expensive). Use item['data_type'] consistently, instead of spider.data_type.
@jpmckinney jpmckinney requested a review from yolile October 4, 2023 20:48
If there are multiple releases, records or packages at the root_path, it now yields FileItems combining at most 100 of those.

This causes ResizePackageMiddleware to be skipped, since ResizePackageMiddleware only processes Files – so there is no doubling of resizing.
yolile
yolile previously approved these changes Oct 4, 2023
…eserve existing behavior when the root_path points to an empty object.
@jpmckinney jpmckinney changed the title fix: ResizePackageMiddleware yields packages with at most 100 items even if sample is set. Avoid JSON encoding (expensive). Use item['data_type'] consistently, instead of spider.data_type. RootPathMiddleware: Combine into multiple packages Oct 5, 2023
@yolile yolile merged commit 9fa02e3 into main Oct 5, 2023
7 of 9 checks passed
@yolile yolile deleted the rootpathmiddleware-limit branch October 5, 2023 12:22
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.

None yet

2 participants