Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion docs/advanced/async_permanent_session.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ backoff decorator to the :code:`retry_execute` argument.
backoff.expo,
Exception,
max_tries=3,
giveup=lambda e: isinstance(e, TransportQueryError),
)
session = await client.connect_async(
reconnecting=True,
Expand All @@ -84,6 +83,18 @@ backoff decorator to the :code:`retry_execute` argument.

If you don't want any retry on the execute calls, you can disable the retries with :code:`retry_execute=False`

.. note::
If you want to retry even with :code:`TransportQueryError` exceptions,
then you need to make your own backoff decorator on your own method:

.. code-block:: python

@backoff.on_exception(backoff.expo,
Exception,
max_tries=3)
async def execute_with_retry(session, query):
return await session.execute(query)

Subscription retries
^^^^^^^^^^^^^^^^^^^^

Expand Down