Skip to content

Commit aa611bd

Browse files
committed
Update example yaml to run against current branch
1 parent 18d3df2 commit aa611bd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/filters.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@ async def do_run() -> None:
4343
print("NamedMap size is :", await named_map.size())
4444

4545
print("Retrieve the Hobbits between the ages of 17 and 21 ...")
46-
async for entry in named_map.entries(Filters.between("age", 17, 21)):
46+
async for entry in await named_map.entries(Filters.between("age", 17, 21)):
4747
print("Key :", entry.key, ", Value :", entry.value)
4848

4949
print("Retrieve the Hobbits between the ages of 17 and 30 and live in Hobbiton ...")
5050
query_filter: Filter = Filters.between("age", 17, 30).And(Filters.equals("home", "Hobbiton"))
51-
async for entry in named_map.entries(query_filter):
51+
async for entry in await named_map.entries(query_filter):
5252
print("Key :", entry.key, ", Value :", entry.value)
5353

5454
print("Retrieve the Hobbits between the ages of 17 and 25 who live in Hobbiton or Frogmorton")
5555
query_filter = Filters.between("age", 17, 25).And(Filters.is_in("home", {"Hobbiton", "Frogmorton"}))
56-
async for entry in named_map.entries(query_filter):
56+
async for entry in await named_map.entries(query_filter):
5757
print("Key :", entry.key, ", Value :", entry.value)
5858

5959
finally:

examples/processors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ async def do_run() -> None:
5454

5555
print("Sending all Hobbits ten years into the future!")
5656
keys: List[int] = []
57-
async for entry in named_map.invoke_all(Processors.increment("age", 10)):
57+
async for entry in await named_map.invoke_all(Processors.increment("age", 10)):
5858
keys.append(entry.key)
5959
print("Updated age of Hobbit with id ", entry.key, "to", entry.value)
6060

6161
print("Displaying all updated Hobbits ...")
62-
async for result in named_map.get_all(set(keys)):
62+
async for result in await named_map.get_all(set(keys)):
6363
print(result.value)
6464

6565
await named_map.remove(hobbit.id)

0 commit comments

Comments
 (0)