MCPcopy
hub / github.com/scrapy/scrapy / _cb_timeout

Method _cb_timeout

scrapy/core/downloader/handlers/http2.py:120–128  ·  view source on GitHub ↗
(
        response: Response, request: Request, timeout: float, timeout_cl: DelayedCall
    )

Source from the content-addressed store, hash-verified

118
119 @staticmethod
120 def _cb_timeout(
121 response: Response, request: Request, timeout: float, timeout_cl: DelayedCall
122 ) -> Response:
123 if timeout_cl.active():
124 timeout_cl.cancel()
125 return response
126
127 url = urldefrag(request.url)[0]
128 raise DownloadTimeoutError(f"Getting {url} took longer than {timeout} seconds.")

Callers

nothing calls this directly

Calls 2

cancelMethod · 0.45

Tested by

no test coverage detected