mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-10-01 22:15:11 +02:00
Move code
This commit is contained in:
@@ -307,6 +307,8 @@ class PregelLoop(LoopProtocol):
|
|||||||
)
|
)
|
||||||
# clear pending writes
|
# clear pending writes
|
||||||
self.checkpoint_pending_writes.clear()
|
self.checkpoint_pending_writes.clear()
|
||||||
|
# "not skip_done_tasks" only applies to first tick after resuming
|
||||||
|
self.skip_done_tasks = True
|
||||||
# save checkpoint
|
# save checkpoint
|
||||||
self._put_checkpoint(
|
self._put_checkpoint(
|
||||||
{
|
{
|
||||||
@@ -382,9 +384,6 @@ class PregelLoop(LoopProtocol):
|
|||||||
# if there are pending writes from a previous loop, apply them
|
# if there are pending writes from a previous loop, apply them
|
||||||
if self.skip_done_tasks and self.checkpoint_pending_writes:
|
if self.skip_done_tasks and self.checkpoint_pending_writes:
|
||||||
self._match_writes(self.tasks)
|
self._match_writes(self.tasks)
|
||||||
elif not self.skip_done_tasks:
|
|
||||||
# "not skip_done_tasks" only applies to first tick after resuming
|
|
||||||
self.skip_done_tasks = True
|
|
||||||
|
|
||||||
# if all tasks have finished, re-tick
|
# if all tasks have finished, re-tick
|
||||||
if all(task.writes for task in self.tasks.values()):
|
if all(task.writes for task in self.tasks.values()):
|
||||||
|
|||||||
Reference in New Issue
Block a user