Just a draft proposal based on review discussion.
Timeouts could be fixed to a CrawlingContext instance and consumers (pipeline steps) of the context could access them to select appropriate timeout, apply it, or even modify the timeout of the following pipeline steps.
Initial context could be created like this:
pipeline_timeout = SharedTimeout(...)
BasicCrawlingContext(.....,
timeouts={
"WholePipeline": pipeline_timeout,
"Navigation": pipeline_timeout.limited_to(NAVIGATION_LIMIT),
"RequestHandler": pipeline_timeout.limited_to(HANDLER_LIMIT)
})
Specialized crawlers (ParselCrawler, PlaywrightCrawler...) could easily add new entries to context.timeouts if needed,
Based on the discussion related to timeout change: #1474 (comment)
Just a draft proposal based on review discussion.
Timeouts could be fixed to a
CrawlingContextinstance and consumers (pipeline steps) of the context could access them to select appropriate timeout, apply it, or even modify the timeout of the following pipeline steps.Initial context could be created like this:
Specialized crawlers (ParselCrawler, PlaywrightCrawler...) could easily add new entries to
context.timeoutsif needed,Based on the discussion related to timeout change: #1474 (comment)