Skip to content

Commit 015a182

Browse files
committed
fixed mistake on not awaiting a future
1 parent 7b2035e commit 015a182

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hello/hello_async_activity_completion.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ def complete_greeting(self, task_token: bytes, input: ComposeGreetingInput) -> N
4343
handle = self.client.get_async_activity_handle(task_token=task_token)
4444
for _ in range(0, 3):
4545
print("Waiting one second...")
46-
asyncio.run_coroutine_threadsafe(handle.heartbeat(), self.loop)
46+
asyncio.run_coroutine_threadsafe(handle.heartbeat(), self.loop).result()
4747
time.sleep(1)
4848

4949
# Complete using the handle
5050
asyncio.run_coroutine_threadsafe(
5151
handle.complete(f"{input.greeting}, {input.name}!"), self.loop
52-
)
52+
).result()
5353

5454

5555
@workflow.defn

0 commit comments

Comments
 (0)