| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9cf9d96 commit 5983f40
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -35,13 +35,22 @@ def status(self): | |||
| 35 | 35 | if job_status.active is not None: | |
| 36 | 36 | if job_status.completion_time is None: | |
| 37 | 37 | return MaterializationJobStatus.RUNNING | |
| 38 | - elif job_status.failed is not None: | ||
| 39 | - self._error = Exception(f"Job {self.job_id()} failed") | ||
| 40 | - return MaterializationJobStatus.ERROR | ||
| 41 | - elif job_status.active is None: | ||
| 42 | - if job_status.completion_time is not None: | ||
| 43 | - if job_status.conditions[0].type == "Complete": | ||
| 44 | - return MaterializationJobStatus.SUCCEEDED | ||
| 38 | + else: | ||
| 39 | + if ( | ||
| 40 | + job_status.completion_time is not None | ||
| 41 | + and job_status.conditions[0].type == "Complete" | ||
| 42 | + ): | ||
| 43 | + return MaterializationJobStatus.SUCCEEDED | ||
| 44 | + | ||
| 45 | + if ( | ||
| 46 | + job_status.conditions is not None | ||
| 47 | + and job_status.conditions[0].type == "Failed" | ||
| 48 | + ): | ||
| 49 | + self._error = Exception( | ||
| 50 | + f"Job {self.job_id()} failed with reason: " | ||
| 51 | + f"{job_status.conditions[0].message}" | ||
| 52 | + ) | ||
| 53 | + return MaterializationJobStatus.ERROR | ||
| 45 | 54 | return MaterializationJobStatus.WAITING | |
| 46 | 55 | ||
| 47 | 56 | def should_be_retried(self): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments