Skip to content

Commit

Permalink
Comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nfcampos committed Dec 4, 2024
1 parent 9733db0 commit de86a46
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libs/langgraph/langgraph/pregel/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ def writer(
CONFIG_KEY_CALL: partial(call, next_task),
},
__reraise_on_exit__=reraise,
# starting a new task in the next tick ensures
# updates from this tick are committed/streamed first
__next_tick__=True,
)
fut.add_done_callback(partial(self.commit, next_task))
Expand Down Expand Up @@ -319,6 +321,9 @@ def writer(
__name__=t.name,
__cancel_on_exit__=True,
__reraise_on_exit__=reraise,
# starting a new task in the next tick ensures
# updates from this tick are committed/streamed first
__next_tick__=True,
),
)
fut.add_done_callback(partial(self.commit, next_task))
Expand Down

0 comments on commit de86a46

Please sign in to comment.