|
7 | 7 | from sqlmesh.core.console import Console, get_console |
8 | 8 | from sqlmesh.core.environment import EnvironmentNamingInfo, execute_environment_statements |
9 | 9 | from sqlmesh.core.macros import RuntimeStage |
10 | | -from sqlmesh.core.model.definition import AuditResult |
11 | 10 | from sqlmesh.core.node import IntervalUnit |
12 | 11 | from sqlmesh.core.notification_target import ( |
13 | 12 | NotificationEvent, |
@@ -168,8 +167,6 @@ def evaluate( |
168 | 167 | batch_index: int, |
169 | 168 | environment_naming_info: EnvironmentNamingInfo, |
170 | 169 | default_catalog: t.Optional[str], |
171 | | - on_audits_complete: t.Optional[t.Callable[[Snapshot, t.List[AuditResult]], None]] = None, |
172 | | - on_audit_warning: t.Optional[t.Callable[[str, t.Optional[str]], None]] = None, |
173 | 170 | **kwargs: t.Any, |
174 | 171 | ) -> t.Tuple[t.List[AuditResult], t.List[AuditError]]: |
175 | 172 | """Evaluate a snapshot and add the processed interval to the state sync. |
@@ -213,8 +210,7 @@ def evaluate( |
213 | 210 | wap_id=wap_id, |
214 | 211 | **kwargs, |
215 | 212 | ) |
216 | | - if on_audits_complete: |
217 | | - on_audits_complete(snapshot, audit_results) |
| 213 | + self.console.store_evaluation_audit_results(snapshot, audit_results) |
218 | 214 |
|
219 | 215 | audit_errors_to_raise: t.List[AuditError] = [] |
220 | 216 | audit_errors_to_warn: t.List[AuditError] = [] |
|
0 commit comments