Skip to content

Commit 2d1eac0

Browse files
committed
Respond to upstream
1 parent a2c662c commit 2d1eac0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

hello_nexus/caller/workflows.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ async def run(self, name: str) -> HelloOutput:
7575
span.add_event("Got NexusOperationHandle (1)")
7676
assert handle.cancel()
7777
try:
78-
await handle.result()
78+
await handle
7979
# TODO(dan): But should this be asyncio.CancelledError? (there's also
8080
# temporalio.exceptions.CancelledError which doesn't inherit from
8181
# asyncio.CancelledError; as a workflow author, this confused me)
@@ -92,7 +92,7 @@ async def run(self, name: str) -> HelloOutput:
9292
HelloInput(name),
9393
)
9494
span.add_event("Got NexusOperationHandle (2)")
95-
result = await handle.result()
95+
result = await handle
9696
span.add_event(f"Got result (2): {result}")
9797
return result
9898
raise AssertionError("Expected Nexus operation to be cancelled")
@@ -107,7 +107,7 @@ async def run(self, name: str) -> HelloOutput:
107107
MyNexusService.hello2,
108108
HelloInput(name),
109109
)
110-
return await handle.result()
110+
return await handle
111111

112112

113113
@workflow.defn
@@ -119,4 +119,4 @@ async def run(self, name: str) -> HelloOutput:
119119
MyNexusService.hello3,
120120
HelloInput(name),
121121
)
122-
return await handle.result()
122+
return await handle

0 commit comments

Comments
 (0)