Skip to content

Commit a80396a

Browse files
committed
Respond to upstream: nexusrpc.asyncio imports
1 parent f529ddf commit a80396a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

temporalio/worker/_nexus.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818

1919
import google.protobuf.json_format
2020
import nexusrpc.handler
21-
from nexusrpc.handler._core import SyncExecutor
21+
from nexusrpc.asyncio import LazyValue
22+
from nexusrpc.asyncio.handler import Handler
23+
from nexusrpc.handler import SyncExecutor
2224

2325
import temporalio.api.common.v1
2426
import temporalio.api.enums.v1
@@ -64,7 +66,7 @@ def __init__(
6466
f"Expected a service instance, but got a class: {service}. "
6567
"Nexus services must be passed as instances, not classes."
6668
)
67-
self._handler = nexusrpc.handler.Handler(
69+
self._handler = Handler(
6870
nexus_services,
6971
SyncExecutor(executor) if executor is not None else None,
7072
)
@@ -275,7 +277,7 @@ async def _start_operation(
275277
temporalio.nexus.current_context.set(
276278
temporalio.nexus.Context(operation_context=ctx)
277279
)
278-
input = nexusrpc.handler.LazyValue(
280+
input = LazyValue(
279281
serializer=_DummyPayloadSerializer(
280282
data_converter=self._data_converter,
281283
payload=start_request.payload,

0 commit comments

Comments
 (0)