Skip to content

Commit

Permalink
PR comment fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cretz committed Jun 10, 2022
1 parent 4a10595 commit 140df7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions temporalio/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,9 +526,9 @@ def random() -> Random:
def upsert_search_attributes(attributes: temporalio.common.SearchAttributes) -> None:
"""Upsert search attributes for this workflow.
The keys will be added/replaced on top of the existing search attributes in
the same manner as :py:meth:`dict.update`. :py:attr:`Info.search_attributes`
will also be updated with these values.
The keys will be added or replaced on top of the existing search attributes
in the same manner as :py:meth:`dict.update`.
:py:attr:`Info.search_attributes` will also be updated with these values.
Technically an existing search attribute cannot be deleted, but an empty
list can be provided for the values which is effectively the same thing.
Expand Down
4 changes: 2 additions & 2 deletions tests/worker/test_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ async def child(id: str):
)
await asyncio.sleep(0.1)
fut.cancel()
await workflow.wait_condition(lambda: len(events) == 4, timeout=4)
await workflow.wait_condition(lambda: len(events) == 4, timeout=30)
# Wait on the future just to make asyncio happy
try:
await fut
Expand Down Expand Up @@ -1197,11 +1197,11 @@ async def test_workflow_search_attributes(server: ExternalServer, client: Client
if not server.supports_custom_search_attributes:
pytest.skip("Custom search attributes not supported")

# Add search attributes if not already present
async def search_attributes_present() -> bool:
resp = await client.service.get_search_attributes(GetSearchAttributesRequest())
return any(k for k in resp.keys.keys() if k.startswith(sa_prefix))

# Add search attributes if not already present
if not await search_attributes_present():
async with grpc.aio.insecure_channel(server.host_port) as channel:
stub = OperatorServiceStub(channel)
Expand Down

0 comments on commit 140df7f

Please sign in to comment.