Skip to content

Commit b70b77d

Browse files
committed
Call console directly in scheduler
1 parent b064654 commit b70b77d

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

sqlmesh/core/scheduler.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from sqlmesh.core.console import Console, get_console
88
from sqlmesh.core.environment import EnvironmentNamingInfo, execute_environment_statements
99
from sqlmesh.core.macros import RuntimeStage
10-
from sqlmesh.core.model.definition import AuditResult
1110
from sqlmesh.core.node import IntervalUnit
1211
from sqlmesh.core.notification_target import (
1312
NotificationEvent,
@@ -168,8 +167,6 @@ def evaluate(
168167
batch_index: int,
169168
environment_naming_info: EnvironmentNamingInfo,
170169
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,
173170
**kwargs: t.Any,
174171
) -> t.Tuple[t.List[AuditResult], t.List[AuditError]]:
175172
"""Evaluate a snapshot and add the processed interval to the state sync.
@@ -213,8 +210,7 @@ def evaluate(
213210
wap_id=wap_id,
214211
**kwargs,
215212
)
216-
if on_audits_complete:
217-
on_audits_complete(snapshot, audit_results)
213+
self.console.store_evaluation_audit_results(snapshot, audit_results)
218214

219215
audit_errors_to_raise: t.List[AuditError] = []
220216
audit_errors_to_warn: t.List[AuditError] = []

0 commit comments

Comments
 (0)