Skip to content

Reconsider how to apply timeouts in Crawler #1596

@Pijukatel

Description

@Pijukatel

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    solutioningThe issue is not being implemented but only analyzed and planned.t-toolingIssues with this label are in the ownership of the tooling team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions