I have several different spiders and want to run all them at once. Based on this and this, I can run multiple spiders in the same process. However, I don't know how to design a signal system to stop the reactor when all spiders are finished.
I have tried:
crawler.signals.connect(reactor.stop, signal=signals.spider_closed)
and
crawler.signals.connect(reactor.stop, signal=signals.spider_idle)
In both cases, the reactor stops when first crawler closes. Of course, I want that the reactor stops after all spiders are finished.
Could someone show me how to do the trick?