I have a scrapy project with multiple spiders. Some take minutes, some take hours, and anything in between - however that elapsed time is usually about the same for each run - so you can assume that scraper X runs for about the same time as scrapers Y and Z together.
What I want to do is instead of running the all in parallel starting at T0, I want to start scrapers 1,2,3 at the start, then chain scrapers 4,5,6 after 2 finishes, and 7,8,9 after 3 finishes to smooth out the downstream processing requirements (concurrent database connections etc)
I think I need to chain the deferreds, and there are some clear examples in the docs, but i'm not sure how to set that up as well as some running in parallel - current starting code is below (each spider is in its own external file)
from scrapy.utils.project import get_project_settings
from scrapy.crawler import CrawlerProcess
setting = get_project_settings()
process = CrawlerProcess(setting)
process.crawl('scraper1')
process.crawl('scraper2')
process.crawl('scraper3')
...etc...
...etc...
process.start()