@@ -236,7 +236,7 @@ def logs(
236236
237237 def run_synchronous (
238238 self , outputfile : Union [str , Path , None ] = None ,
239- print = print , max_poll_interval = 60 , connection_retry_interval = 30 , log_error = True
239+ print = print , max_poll_interval = 60 , connection_retry_interval = 30 , show_error_logs : bool = True
240240 ) -> BatchJob :
241241 """
242242 Start the job, wait for it to finish and download result
@@ -245,12 +245,12 @@ def run_synchronous(
245245 :param print: print/logging function to show progress/status
246246 :param max_poll_interval: maximum number of seconds to sleep between status polls
247247 :param connection_retry_interval: how long to wait when status poll failed due to connection issue
248- :param log_error : whether to print error logs
248+ :param show_error_logs : whether to automatically print error logs when the batch job failed.
249249 :return:
250250 """
251251 self .start_and_wait (
252252 print = print , max_poll_interval = max_poll_interval , connection_retry_interval = connection_retry_interval ,
253- log_error = log_error
253+ show_error_logs = show_error_logs
254254 )
255255 # TODO #135 support multi file result sets too?
256256 if outputfile is not None :
@@ -259,7 +259,7 @@ def run_synchronous(
259259
260260 def start_and_wait (
261261 self , print = print , max_poll_interval : int = 60 , connection_retry_interval : int = 30 , soft_error_max = 10 ,
262- log_error = True
262+ show_error_logs : bool = True
263263 ) -> BatchJob :
264264 """
265265 Start the batch job, poll its status and wait till it finishes (or fails)
@@ -268,7 +268,7 @@ def start_and_wait(
268268 :param max_poll_interval: maximum number of seconds to sleep between status polls
269269 :param connection_retry_interval: how long to wait when status poll failed due to connection issue
270270 :param soft_error_max: maximum number of soft errors (e.g. temporary connection glitches) to allow
271- :param log_error : whether to print error logs
271+ :param show_error_logs : whether to automatically print error logs when the batch job failed.
272272 :return:
273273 """
274274 # TODO rename `connection_retry_interval` to something more generic?
@@ -327,7 +327,7 @@ def soft_error(message: str):
327327
328328 if status != "finished" :
329329 # TODO: render logs jupyter-aware in a notebook context?
330- if log_error :
330+ if show_error_logs :
331331 print (f"Your batch job { self .job_id !r} failed. Error logs:" )
332332 print (self .logs (level = logging .ERROR ))
333333 print (
0 commit comments