Skip to content

Commit

Permalink
Add comments around the necessity of _parent_task and _pool on `M…
Browse files Browse the repository at this point in the history
…icrobatchModelRunner`
  • Loading branch information
QMalcolm committed Mar 3, 2025
1 parent a32a7ae commit ef461da
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/dbt/task/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,9 @@ class MicrobatchModelRunner(ModelRunner):
def __init__(self, config, adapter, node, node_index: int, num_nodes: int):
super().__init__(config, adapter, node, node_index, num_nodes)

# The parent task is necessary because we need access to the `_submit_batch` and `submit` methods
self._parent_task: Optional[RunTask] = None
# The pool is necessary because we need to batches to be executed within the same thread pool
self._pool: Optional[DbtThreadPool] = None

def set_parent_task(self, parent_task: RunTask) -> None:
Expand Down

0 comments on commit ef461da

Please sign in to comment.