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

Allow to skip execution of FieldCoverageMonitor if no item is returned #366

Closed
rennerocha opened this issue Nov 3, 2022 · 0 comments · Fixed by #372
Closed

Allow to skip execution of FieldCoverageMonitor if no item is returned #366

rennerocha opened this issue Nov 3, 2022 · 0 comments · Fixed by #372
Milestone

Comments

@rennerocha
Copy link
Collaborator

This is a fork of issue #339 .

FieldCoverageMonitor requires that we have at least one item returned, or else it will fail. However there are situations when we accept that a spider return no items, but if items are returned, we want to ensure our field coverage.

In a project that are in production, we have dozens of real estate websites searching for locations in different neighborhoods daily. Some neighborhoods sometimes doesn't return any item in a specific day, but when data is returned we want to ensure that all the fields has the right coverage.

One possible solution (that looks simpler to implement) would be add a new setting called SPIDERMON_FIELD_COVERAGE_SKIP_IF_NO_ITEM (or something similar). If set to True and no item is returned, field coverage will not be checked, otherwise, it will work as it is now.

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 a pull request may close this issue.

1 participant