MCPcopy
hub / github.com/scrapy/scrapy / process_chain

Function process_chain

scrapy/utils/defer.py:298–314  ·  view source on GitHub ↗

Return a Deferred built by chaining the given callbacks

(
    callbacks: Iterable[Callable[Concatenate[_T, _P], _T]],
    input: _T,  # noqa: A002
    *a: _P.args,
    **kw: _P.kwargs,
)

Source from the content-addressed store, hash-verified

296
297
298def process_chain(
299 callbacks: Iterable[Callable[Concatenate[_T, _P], _T]],
300 input: _T, # noqa: A002
301 *a: _P.args,
302 **kw: _P.kwargs,
303) -> Deferred[_T]: # pragma: no cover
304 """Return a Deferred built by chaining the given callbacks"""
305 warnings.warn(
306 "process_chain() is deprecated.",
307 category=ScrapyDeprecationWarning,
308 stacklevel=2,
309 )
310 d: Deferred[_T] = Deferred()
311 for x in callbacks:
312 d.addCallback(x, *a, **kw)
313 d.callback(input)
314 return d
315
316
317def process_parallel(

Callers

nothing calls this directly

Calls 1

callbackMethod · 0.80

Tested by

no test coverage detected