Apply tasks asynchronously by sending a message. Arguments: args (Tuple): The positional arguments to pass on to the task. kwargs (Dict): The keyword arguments to pass on to the task. countdown (float): Number of seconds into the future that the
(self, args=None, kwargs=None, task_id=None, producer=None,
link=None, link_error=None, shadow=None, **options)
| 585 | return self.apply_async(args, kwargs) |
| 586 | |
| 587 | def apply_async(self, args=None, kwargs=None, task_id=None, producer=None, |
| 588 | link=None, link_error=None, shadow=None, **options): |
| 589 | """Apply tasks asynchronously by sending a message. |
| 590 | |
| 591 | Arguments: |
| 592 | args (Tuple): The positional arguments to pass on to the task. |
| 593 | |
| 594 | kwargs (Dict): The keyword arguments to pass on to the task. |
| 595 | |
| 596 | countdown (float): Number of seconds into the future that the |
| 597 | task should execute. Defaults to immediate execution. |
| 598 | |
| 599 | eta (~datetime.datetime): Absolute time and date of when the task |
| 600 | should be executed. May not be specified if `countdown` |
| 601 | is also supplied. |
| 602 | |
| 603 | expires (float, ~datetime.datetime): Datetime or |
| 604 | seconds in the future for the task should expire. |
| 605 | The task won't be executed after the expiration time. |
| 606 | |
| 607 | shadow (str): Override task name used in logs/monitoring. |
| 608 | Default is retrieved from :meth:`shadow_name`. |
| 609 | |
| 610 | connection (kombu.Connection): Reuse existing broker connection |
| 611 | instead of acquiring one from the connection pool. |
| 612 | |
| 613 | retry (bool): If enabled sending of the task message will be |
| 614 | retried in the event of connection loss or failure. |
| 615 | Default is taken from the :setting:`task_publish_retry` |
| 616 | setting. Note that you need to handle the |
| 617 | producer/connection manually for this to work. |
| 618 | |
| 619 | retry_policy (Mapping): Override the retry policy used. |
| 620 | See the :setting:`task_publish_retry_policy` setting. |
| 621 | |
| 622 | time_limit (int): If set, overrides the default time limit. |
| 623 | |
| 624 | soft_time_limit (int): If set, overrides the default soft |
| 625 | time limit. |
| 626 | |
| 627 | queue (str, kombu.Queue): The queue to route the task to. |
| 628 | This must be a key present in :setting:`task_queues`, or |
| 629 | :setting:`task_create_missing_queues` must be |
| 630 | enabled. See :ref:`guide-routing` for more |
| 631 | information. |
| 632 | |
| 633 | exchange (str, kombu.Exchange): Named custom exchange to send the |
| 634 | task to. Usually not used in combination with the ``queue`` |
| 635 | argument. |
| 636 | |
| 637 | routing_key (str): Custom routing key used to route the task to a |
| 638 | worker server. If in combination with a ``queue`` argument |
| 639 | only used to specify custom routing keys to topic exchanges. |
| 640 | |
| 641 | priority (int): The task priority, a number between 0 and 9. |
| 642 | The interpretation is broker-specific: with RabbitMQ, higher |
| 643 | numbers denote higher priority; with Redis, priority ``0`` is |
| 644 | the highest priority. See |
no test coverage detected