celery.utils.dispatch.signal
class celery.utils.dispatch.signal.Signal(providing_args=None)[源代码]
Base class for all signals
receivers
Internal attribute, holds a dictionary of
`{receriverkey (id): weakref(receiver)}` mappings.
connect(\args, **kwargs*)
Connect receiver to sender for signal.
disconnect(receiver=None, sender=None, weak=True, dispatch_uid=None)[源代码]
Disconnect receiver from sender for signal.
If weak references are used, disconnect need not be called. The receiver will be removed from dispatch automatically.
send_robust(sender, \*named*)
Send signal from sender to all connected receivers catching errors.
if any receiver raises an error (specifically any subclass of Exception), the error instance is returned as the result for that receiver.