MCPcopy
hub / github.com/scrapy/scrapy / send_catch_log_async

Method send_catch_log_async

scrapy/signalmanager.py:75–92  ·  view source on GitHub ↗

Like :meth:`send_catch_log` but supports :ref:`asynchronous signal handlers <signal-deferred>`. Returns a coroutine that completes once all signal handlers have finished. Send a signal, catch exceptions and log them. The keyword arguments are passed to the

(
        self, signal: Any, **kwargs: Any
    )

Source from the content-addressed store, hash-verified

73 return _signal._send_catch_log_deferred(signal, **kwargs)
74
75 async def send_catch_log_async(
76 self, signal: Any, **kwargs: Any
77 ) -> list[tuple[Any, Any]]:
78 """
79 Like :meth:`send_catch_log` but supports :ref:`asynchronous signal
80 handlers <signal-deferred>`.
81
82 Returns a coroutine that completes once all signal handlers
83 have finished. Send a signal, catch exceptions and log them.
84
85 The keyword arguments are passed to the signal handlers (connected
86 through the :meth:`connect` method).
87
88 .. versionadded:: 2.14
89 """
90 # note that this returns exceptions instead of Failures in the second tuple member
91 kwargs.setdefault("sender", self.sender)
92 return await _signal.send_catch_log_async(signal, **kwargs)
93
94 def disconnect_all(self, signal: Any, **kwargs: Any) -> None:
95 """

Callers 8

start_itemproc_asyncMethod · 0.80
start_asyncMethod · 0.80
stop_asyncMethod · 0.80
open_spider_asyncMethod · 0.80
close_spider_asyncMethod · 0.80
close_spiderMethod · 0.80
_close_slotMethod · 0.80
test_exception_signalMethod · 0.80

Calls 1

setdefaultMethod · 0.45

Tested by 1

test_exception_signalMethod · 0.64