Rosheen Pervaiz
Rosheen Pervaiz
@rennerocha @raphapassini What about `SPIDERMON_CLOSESPIDER_BY_EXPRESSIONS_MONITOR` ? In which we check periodically for errors like we do in periodic monitors and end spider if certain limit is reached. And allow all...
@rennerocha @raphapassini Maybe Something like this roughly ? ``` class SpiderPeriodicMonitorSuit(MonitorSuite): monitors_m = { "tests": [ {"expression": "stats['item_scraped_count'] < 30"}, ] } monitors = [create_monitor_class_from_dict(monitors_m, monitor_class=ExpressionsMonitor)] def on_monitors_failed(self, result): self._crawler.stop()...
@Gallaecio @rennerocha @raphapassini Please have a look at the comment of @andrewbaxter
https://github.com/scrapinghub/spidermon/pull/216 Proposed Solution [PR] ⬆️ I have added a new setting in **spidermon** as proposed by @raphapassini above ``` SPIDERMON_CLOSESPIDER_BY_STATS = { "spidermon/validation/": 10, } ``` **Note:** Documentation is not...
https://github.com/scrapinghub/spidermon/blob/master/tests/contrib/scrapy/test_extensions.py