Skip to content

Commit

Permalink
docs: fix topology documentation (#6134)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoanFM authored Jan 8, 2024
1 parent 15a7b80 commit be263b1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/concepts/orchestration/flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -522,12 +522,18 @@ class BazExecutor(Executor):
docs.append(TextDoc(text=f'baz was here and got {len(docs)} document'))
class MergeExecutor(Executor):
@requests
async def merge(self, docs: DocList[TextDoc], **kwargs) -> DocList[TextDoc]:
return docs
f = (
Flow()
.add(uses=FooExecutor, name='fooExecutor')
.add(uses=BarExecutor, name='barExecutor', needs='fooExecutor')
.add(uses=BazExecutor, name='bazExecutor', needs='fooExecutor')
.add(needs=['barExecutor', 'bazExecutor'])
.add(uses=MergeExecutor, needs=['barExecutor', 'bazExecutor'])
)
```

Expand Down

0 comments on commit be263b1

Please sign in to comment.