Skip to content

Commit 9092646

Browse files
committed
REF: Rename log_final_retry_error to log_errors
1 parent 8d54144 commit 9092646

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

octue/resources/child.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def ask(
7272
raise_errors=True,
7373
max_retries=0,
7474
prevent_retries_when=None,
75-
log_final_retry_error=True,
75+
log_errors=True,
7676
timeout=86400,
7777
maximum_heartbeat_interval=300,
7878
):
@@ -100,7 +100,7 @@ def ask(
100100
:param bool raise_errors: if `True` and the question fails, raise the error; if False, return the error
101101
:param int max_retries: if `raise_errors=False` and the question fails, retry the question up to this number of times
102102
:param list(type)|None prevent_retries_when: if `raise_errors=False` and the question fails, prevent retrying the question if it fails with an exception type in this list
103-
:param bool log_final_retry_error: if `True`, `raise_errors=False`, and the question fails after its final retry, log the error
103+
:param bool log_errors: if `True`, `raise_errors=False`, and the question fails after its final retry, log the error
104104
:param float timeout: time in seconds to wait for an answer before raising a timeout error
105105
:param float|int maximum_heartbeat_interval: the maximum amount of time (in seconds) allowed between child heartbeats before an error is raised
106106
:raise TimeoutError: if the timeout is exceeded while waiting for an answer
@@ -160,14 +160,14 @@ def ask(
160160
logger.info("Retrying question %r %d of %d times.", question_uuid, retry + 1, max_retries)
161161

162162
inputs["retry_count"] += 1
163-
answer, question_uuid = self.ask(**inputs, raise_errors=False, log_final_retry_error=False)
163+
answer, question_uuid = self.ask(**inputs, raise_errors=False, log_errors=False)
164164

165165
if not isinstance(answer, Exception) or type(answer) in prevent_retries_when:
166166
return answer, question_uuid
167167

168168
e = answer
169169

170-
if log_final_retry_error:
170+
if log_errors:
171171
logger.error(
172172
"Question %r failed after %d retries (see below for error).",
173173
question_uuid,

0 commit comments

Comments
 (0)