scrapinghub / spidermon

Scrapy Extension for monitoring spiders execution.
https://spidermon.readthedocs.io
BSD 3-Clause "New" or "Revised" License
530 stars 96 forks source link

Avoid TypeError when running at PeriodicItemCountMonitor #436

Closed VMRuiz closed 7 months ago

VMRuiz commented 7 months ago

Fixes https://github.com/scrapinghub/spidermon/issues/427

However, the monitor will still won't pass until item_scraped_count is defined. I'm not sure if we should include the possibility of wanting this monitor to pass when tresshold is 0 and item_scraped_count is None.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 79.43%. Comparing base (8493465) to head (98075ce).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #436 +/- ## ======================================= Coverage 79.43% 79.43% ======================================= Files 76 76 Lines 3229 3229 Branches 536 536 ======================================= Hits 2565 2565 Misses 593 593 Partials 71 71 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.