Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make doc consistent #688

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Here's an example processing a stream of incoming orders:
amount: int

@app.agent(value_type=Order)
async def order(orders):
async def process_order(orders):
async for order in orders:
# process infinite stream of orders.
print(f'Order for {order.account_id}: {order.amount}')
Expand Down
2 changes: 1 addition & 1 deletion docs/includes/intro.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Here's an example processing a stream of incoming orders:
amount: int

@app.agent(value_type=Order)
async def order(orders):
async def process_order(orders):
async for order in orders:
# process infinite stream of orders.
print(f'Order for {order.account_id}: {order.amount}')
Expand Down
4 changes: 2 additions & 2 deletions docs/userguide/streams.rst
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ stream by taking a "key type" as argument:
orders_topic = app.topic('orders', value_type=Order)

@app.agent(orders_topic)
async def process(orders):
async def process_order(orders):
async for order in orders.group_by(Order.account_id):
...

Expand Down Expand Up @@ -338,7 +338,7 @@ the data in streams you can manually extract the key used for repartitioning:
return json.loads(order)['account_id']

@app.agent(app.topic('order'))
async def process(orders):
async def process_order(orders):
async for order in orders.group_by(get_order_account_id):
...

Expand Down
2 changes: 1 addition & 1 deletion docs/userguide/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ To test an agent when unit testing or functional testing, use the special
orders_for_account = app.Table('order-count-by-account', default=int)

@app.agent(orders_topic)
async def order(orders):
async def process_order(orders):
async for order in orders.group_by(Order.account_id):
orders_for_account[order.account_id] += 1
yield order
Expand Down