Skip to content

Request handler should be able to timeout blocking sync code in user defined handler #908

@Pijukatel

Description

@Pijukatel

Current purely async implementation of request handler is not capable of triggering timeout for blocking sync code. Such code is created by users and we have no control over it. So we can't expect only async blocking code.

Following simple user defined handler can't currently trigger timeout even if it should.

@crawler.router.default_handler
async def handler(context: BasicCrawlingContext) -> None:
    time.sleep(some_big_time)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working.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