Skip to content

Commit

Permalink
Feature the aggressive retry policy in the code example
Browse files Browse the repository at this point in the history
  • Loading branch information
Gallaecio committed Dec 18, 2024
1 parent 9ce3d30 commit 4e021e9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/usage/retry.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ including ready-to-use examples.

In scrapy-zyte-api, use the :setting:`ZYTE_API_RETRY_POLICY` setting or the
:reqmeta:`zyte_api_retry_policy` :attr:`Request.meta
<scrapy.http.Request.meta>` key to point to a custom retry policy or to its
import path, to override the default retry policy:
<scrapy.http.Request.meta>` key to point to the import path of a retry policy
to use. For example, to switch to the :ref:`aggressive retry policy
<aggressive-retry-policy>`:

.. code-block:: python
:caption: settings.py
ZYTE_API_RETRY_POLICY = "project.retry_policies.CUSTOM_RETRY_POLICY"
ZYTE_API_RETRY_POLICY = "zyte_api.aggressive_retrying"

0 comments on commit 4e021e9

Please sign in to comment.