Skip to content

Commit

Permalink
fix: don't check whether add the watch succeeded; it idempotent.
Browse files Browse the repository at this point in the history
there are corner cases where we can submit tasks back upstream and reuse the same prefix for joining.
  • Loading branch information
provos committed Aug 30, 2024
1 parent 871d726 commit c3ee83d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/planai/joined_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ def consume_work(self, task: TaskWorkItem):
)
if prefix not in self._joined_results:
# we will register the watch for the prefix when we see it for the first time.
if not self.watch(prefix):
raise ValueError(
f"Task {task} does not have a watch for {self.join_type} in provenance."
)
self.watch(prefix)

# we accumulate the results by the prefix described by join_type
# we will deliver them to the sub-class when we get notified
Expand Down

0 comments on commit c3ee83d

Please sign in to comment.