From 51067a4345efff4f7450408a57541e65090456be Mon Sep 17 00:00:00 2001 From: Janusz Kamienski Date: Fri, 22 Sep 2023 11:52:25 +0200 Subject: [PATCH] remove docs on multiple signals --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6ac6ab7..cf7d5fc 100644 --- a/README.md +++ b/README.md @@ -71,19 +71,18 @@ You can also pass the celery options to the task using the param in the decorato ```python @receiver_task(profile_updated_signal, celery_task_options={'queue': 'profile-updated-queue'}) +def foo(sender, message: ProfileMessage, **kwargs): + ... ``` The decorator also accepts all other keyword arguments as regular `django.dispatch.receiver` decorator (ie. same as [Signal.connect](https://docs.djangoproject.com/en/4.2/topics/signals/#django.dispatch.Signal.connect). For example you can set the `dispatch_uid` to avoid registering the same receiver multiple times. ```python @receiver_task(profile_updated_signal, dispatch_uid='profile_updated') +def foo(sender, message: ProfileMessage, **kwargs): + ... ``` -As in `@receiver` decorator you can also pass a list of signals that the receiver should be connected to: - -```python -@receiver_task([profile_updated_signal, profile_deleted_signal]) -``` # Limitations