File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,15 @@ def refresh(self) -> None:
6464 if self .is_creation_task ():
6565 self .errors_url = self .result_url
6666
67+ def has_errors (self ) -> bool :
68+ if self .type == "export-data-rows" :
69+ # self.errors fetches the error content.
70+ # This first condition prevents us from downloading the content for v2 exports
71+ return bool (self .errors_url or self .errors )
72+ if self .is_creation_task ():
73+ return bool (self .failed_data_rows )
74+ return self .status == "FAILED"
75+
6776 def wait_till_done (self ,
6877 timeout_seconds : float = 300.0 ,
6978 check_frequency : float = 2.0 ) -> None :
@@ -79,9 +88,7 @@ def wait_till_done(self,
7988 "Expected check frequency to be two seconds or more" )
8089 while timeout_seconds > 0 :
8190 if self .status != "IN_PROGRESS" :
82- # self.errors fetches the error content.
83- # This first condition prevents us from downloading the content for v2 exports
84- if self .errors_url is not None or self .errors is not None :
91+ if self .has_errors ():
8592 logger .warning (
8693 "There are errors present. Please look at `task.errors` for more details"
8794 )
You can’t perform that action at this time.
0 commit comments