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)
| 463 | return self.apply_async(args, kwargs) |
| 464 | |
| 465 | def apply_async(self, args=None, kwargs=None, task_id=None, producer=None, |
| 466 | link=None, link_error=None, shadow=None, **options): |
| 467 | class="st">"""Apply tasks asynchronously by sending a message. |
| 468 | |
| 469 | Arguments: |
| 470 | args (Tuple): The positional arguments to pass on to the task. |
| 471 | |
| 472 | kwargs (Dict): The keyword arguments to pass on to the task. |
| 473 | |
| 474 | countdown (float): Number of seconds into the future that the |
| 475 | task should execute. Defaults to immediate execution. |
| 476 | |
| 477 | eta (~datetime.datetime): Absolute time and date of when the task |
| 478 | should be executed. May not be specified if `countdown` |
| 479 | is also supplied. |
| 480 | |
| 481 | expires (float, ~datetime.datetime): Datetime or |
| 482 | seconds in the future for the task should expire. |
| 483 | The task won&class="cm">#x27;t be executed after the expiration time. |
| 484 | |
| 485 | shadow (str): Override task name used in logs/monitoring. |
| 486 | Default is retrieved from :meth:`shadow_name`. |
| 487 | |
| 488 | connection (kombu.Connection): Reuse existing broker connection |
| 489 | instead of acquiring one from the connection pool. |
| 490 | |
| 491 | retry (bool): If enabled sending of the task message will be |
| 492 | retried in the event of connection loss or failure. |
| 493 | Default is taken from the :setting:`task_publish_retry` |
| 494 | setting. Note that you need to handle the |
| 495 | producer/connection manually for this to work. |
| 496 | |
| 497 | retry_policy (Mapping): Override the retry policy used. |
| 498 | See the :setting:`task_publish_retry_policy` setting. |
| 499 | |
| 500 | time_limit (int): If set, overrides the default time limit. |
| 501 | |
| 502 | soft_time_limit (int): If set, overrides the default soft |
| 503 | time limit. |
| 504 | |
| 505 | queue (str, kombu.Queue): The queue to route the task to. |
| 506 | This must be a key present in :setting:`task_queues`, or |
| 507 | :setting:`task_create_missing_queues` must be |
| 508 | enabled. See :ref:`guide-routing` for more |
| 509 | information. |
| 510 | |
| 511 | exchange (str, kombu.Exchange): Named custom exchange to send the |
| 512 | task to. Usually not used in combination with the ``queue`` |
| 513 | argument. |
| 514 | |
| 515 | routing_key (str): Custom routing key used to route the task to a |
| 516 | worker server. If in combination with a ``queue`` argument |
| 517 | only used to specify custom routing keys to topic exchanges. |
| 518 | |
| 519 | priority (int): The task priority, a number between 0 and 9. |
| 520 | Defaults to the :attr:`priority` attribute. |
| 521 | |
| 522 | serializer (str): Serialization method to use. |
no test coverage detected