Skip to content

Commit a0ec430

Browse files
committed
Tidy up
1 parent e674d73 commit a0ec430

2 files changed

Lines changed: 16 additions & 15 deletions

File tree

sqlmesh/core/scheduler.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -514,21 +514,18 @@ def run_node(node: SchedulingUnit) -> None:
514514
execution_time=execution_time,
515515
)
516516
else:
517-
with self.snapshot_evaluator.execution_tracker.track_execution(
518-
f"{snapshot.name}_{node.batch_index}"
519-
) as execution_context:
520-
audit_results = self.evaluate(
521-
snapshot=snapshot,
522-
environment_naming_info=environment_naming_info,
523-
start=start,
524-
end=end,
525-
execution_time=execution_time,
526-
deployability_index=deployability_index,
527-
batch_index=node.batch_index,
528-
allow_destructive_snapshots=allow_destructive_snapshots,
529-
allow_additive_snapshots=allow_additive_snapshots,
530-
target_table_exists=snapshot.snapshot_id not in snapshots_to_create,
531-
)
517+
audit_results = self.evaluate(
518+
snapshot=snapshot,
519+
environment_naming_info=environment_naming_info,
520+
start=start,
521+
end=end,
522+
execution_time=execution_time,
523+
deployability_index=deployability_index,
524+
batch_index=node.batch_index,
525+
allow_destructive_snapshots=allow_destructive_snapshots,
526+
allow_additive_snapshots=allow_additive_snapshots,
527+
target_table_exists=snapshot.snapshot_id not in snapshots_to_create,
528+
)
532529

533530
evaluation_duration_ms = now_timestamp() - execution_start_ts
534531
finally:
@@ -547,6 +544,9 @@ def run_node(node: SchedulingUnit) -> None:
547544
num_audits - num_audits_failed,
548545
num_audits_failed,
549546
execution_stats=execution_stats,
547+
auto_restatement_triggers=auto_restatement_triggers.get(
548+
snapshot.snapshot_id
549+
),
550550
)
551551
elif isinstance(node, CreateNode):
552552
self.snapshot_evaluator.create_snapshot(

tests/core/engine_adapter/integration/test_integration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2434,6 +2434,7 @@ def capture_execution_stats(
24342434
num_audits_failed,
24352435
audit_only=False,
24362436
execution_stats=None,
2437+
auto_restatement_triggers=None,
24372438
):
24382439
if execution_stats is not None:
24392440
actual_execution_stats[snapshot.model.name.replace(f"{schema_name}.", "")] = (

0 commit comments

Comments
 (0)