File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55from temporalio .client import Client
66from temporalio .worker import UnsandboxedWorkflowRunner , Worker
77
8- from hello_nexus .caller .workflows import (
8+ from hello_nexus .caller .workflows_via_interface import (
99 Echo2CallerWorkflow ,
1010 Echo3CallerWorkflow ,
1111 EchoCallerWorkflow ,
1717
1818
1919async def execute_workflow (workflow_cls : Type [Any ], input : Any ) -> None :
20- client = await Client .connect ("localhost:7233" , namespace = "my-caller-namespace-python" )
20+ client = await Client .connect (
21+ "localhost:7233" , namespace = "my-caller-namespace-python"
22+ )
2123 task_queue = "my-caller-task-queue"
2224
2325 async with Worker (
File renamed without changes.
Original file line number Diff line number Diff line change @@ -23,11 +23,13 @@ class EchoOutput:
2323 message : str
2424
2525
26- @nexusrpc .service
26+ # TODO(dan): for now, making interface explicit in imports to distinguish from handler
27+ # implementation. Final import scheme and names TBD.
28+ @nexusrpc .interface .service
2729class MyNexusService :
28- echo : nexusrpc .Operation [EchoInput , EchoOutput ]
29- hello : nexusrpc .Operation [HelloInput , HelloOutput ]
30- echo2 : nexusrpc .Operation [EchoInput , EchoOutput ]
31- hello2 : nexusrpc .Operation [HelloInput , HelloOutput ]
32- echo3 : nexusrpc .Operation [EchoInput , EchoOutput ]
33- hello3 : nexusrpc .Operation [HelloInput , HelloOutput ]
30+ echo : nexusrpc .interface . Operation [EchoInput , EchoOutput ]
31+ hello : nexusrpc .interface . Operation [HelloInput , HelloOutput ]
32+ echo2 : nexusrpc .interface . Operation [EchoInput , EchoOutput ]
33+ hello2 : nexusrpc .interface . Operation [HelloInput , HelloOutput ]
34+ echo3 : nexusrpc .interface . Operation [EchoInput , EchoOutput ]
35+ hello3 : nexusrpc .interface . Operation [HelloInput , HelloOutput ]
You can’t perform that action at this time.
0 commit comments