Move code

This commit is contained in:
Nuno Campos
2024-11-06 09:02:06 -08:00
parent 32f58258aa
commit 72d497e052
+2 -3
View File
@@ -307,6 +307,8 @@ class PregelLoop(LoopProtocol):
)
# clear pending writes
self.checkpoint_pending_writes.clear()
# "not skip_done_tasks" only applies to first tick after resuming
self.skip_done_tasks = True
# save checkpoint
self._put_checkpoint(
{
@@ -382,9 +384,6 @@ class PregelLoop(LoopProtocol):
# if there are pending writes from a previous loop, apply them
if self.skip_done_tasks and self.checkpoint_pending_writes:
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(task.writes for task in self.tasks.values()):