Skip to content

Commit c8b1d63

Browse files
committed
ENH: Add raise_errors option to Service.wait_for_answer
skipci
1 parent ec63c50 commit c8b1d63

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

octue/cloud/pub_sub/service.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ def wait_for_answer(
393393
record_events=True,
394394
timeout=60,
395395
maximum_heartbeat_interval=DEFAULT_MAXIMUM_HEARTBEAT_INTERVAL,
396+
raise_errors=True,
396397
):
397398
"""Wait for an answer to a question on the given subscription, deleting the subscription and its topic once
398399
the answer is received.
@@ -402,6 +403,7 @@ def wait_for_answer(
402403
:param bool record_events: if `True`, record messages received from the child in the `received_events` attribute
403404
:param float|None timeout: how long in seconds to wait for an answer before raising a `TimeoutError`
404405
:param float|int maximum_heartbeat_interval: the maximum amount of time (in seconds) allowed between child heartbeats before an error is raised
406+
:param bool raise_errors:
405407
:raise TimeoutError: if the timeout is exceeded
406408
:return dict: dictionary containing the keys "output_values" and "output_manifest"
407409
"""
@@ -415,6 +417,7 @@ def wait_for_answer(
415417
subscription=subscription,
416418
handle_monitor_message=handle_monitor_message,
417419
record_events=record_events,
420+
raise_errors=raise_errors,
418421
)
419422

420423
try:

0 commit comments

Comments
 (0)