Skip to content

Commit 4fe8874

Browse files
committed
DOC: Update question asking documentation
skipci
1 parent 182f487 commit 4fe8874

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

docs/source/asking_questions.rst

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ You can also set the following options when you call :mod:`Child.ask <octue.reso
6868
- ``question_uuid`` - if provided, the question will use this UUID instead of a generated one
6969
- ``push_endpoint`` - if provided, the result and other events produced during the processing of the question will be pushed to this HTTP endpoint (a URL)
7070
- ``asynchronous`` - if ``True``, don't wait for an answer to the question (the result and other events can be :ref:`retrieved from the event store later <retrieving_asynchronous_answers>`)
71+
- If ``raise_errors=False`` is provided, answers are returned for all successful questions while unraised errors are logged and returned for unsuccessful ones
72+
- If ``raise_errors=False`` is provided with ``max_retries > 0``, failed questions are retried up to this number of times
73+
- If ``raise_errors=False`` is provided with ``max_retries > 0`` and ``prevent_retries_when`` is set to a list of exception types, failed questions are retried except for those whose exception types are in the list
74+
- ``log_errors``: If `True` and ``raise_errors=False``, any errors remaining once retries are exhausted are logged in addition to being returned
7175
- ``timeout`` - how long in seconds to wait for an answer (``None`` by default - i.e. don't time out)
7276

7377
Exceptions raised by a child
@@ -185,8 +189,8 @@ access the event store and run:
185189

186190
Asking multiple questions in parallel
187191
=====================================
188-
You can also ask multiple questions to a service in parallel. By default, if any of the questions fail, an error is
189-
raised and no answers are returned.
192+
You can also ask multiple questions to a service in parallel - just provide any number of questions as dictionaries of
193+
`Child.ask` arguments:
190194

191195
.. code-block:: python
192196
@@ -203,18 +207,11 @@ raised and no answers are returned.
203207
204208
This method uses multithreading, allowing all the questions to be asked at once instead of one after another.
205209

206-
**Options**
210+
.. hint::
207211

208-
- If ``raise_errors=False`` is provided, answers are returned for all successful questions while unraised errors are
209-
logged and returned for unsuccessful ones
210-
- If ``raise_errors=False`` is provided with ``max_retries > 0``, failed questions are retried up to this number of
211-
times
212-
- If ``raise_errors=False`` is provided with ``max_retries > 0`` and ``prevent_retries_when`` is set to a list of
213-
exception types, failed questions are retried except for those whose exception types are in the list
214-
- ``max_workers``: The maximum number of threads that can be used to ask questions in parallel can be set via this
215-
argument. It has no effect on the total number of questions that can be asked via ``Child.ask_multiple``.
216-
- ``log_errors``: If `True` and ``raise_errors=False``, any errors remaining once retries are exhausted are logged in
217-
addition to being returned
212+
The maximum number of threads that can be used to ask questions in parallel can be set via the ``max_workers``
213+
argument. It has no effect on the total number of questions that can be asked, just how many can be in progress at
214+
once.
218215

219216

220217
Asking a question within a service

0 commit comments

Comments
 (0)