File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33from message_passing .introduction import Language
44from message_passing .introduction .workflows import (
5- ApproveInput ,
65 GetLanguagesInput ,
76 SetLanguageInput ,
87 SetLanguageUsingActivityInput ,
@@ -49,8 +48,3 @@ async def run(self) -> None:
4948 == Language .ARABIC
5049 )
5150 print (f"language changed: { previous_language .name } -> { Language .ARABIC .name } " )
52-
53- # Approve
54- await nexus_client .execute_operation (
55- GreetingService .approve , ApproveInput (name = "" )
56- )
Original file line number Diff line number Diff line change 77from __future__ import annotations
88
99import nexusrpc
10- from temporalio import nexus
1110from temporalio .client import Client , WorkflowHandle
1211from temporalio .common import WorkflowIDConflictPolicy
1312
1413from message_passing .introduction import Language
1514from message_passing .introduction .workflows import (
16- ApproveInput ,
1715 GetLanguagesInput ,
1816 GreetingWorkflow ,
1917 SetLanguageInput ,
@@ -78,12 +76,3 @@ async def set_language_using_activity(
7876 return await self .greeting_workflow_handle .execute_update (
7977 GreetingWorkflow .set_language_using_activity , input .language
8078 )
81-
82- @nexusrpc .handler .sync_operation
83- async def approve (
84- self , ctx : nexusrpc .handler .StartOperationContext , input : ApproveInput
85- ) -> None :
86- await self .greeting_workflow_handle .signal (GreetingWorkflow .approve , input )
87- self .greeting_workflow_handle = await self ._get_workflow_handle (
88- nexus .client (), nexus .info ().task_queue
89- )
Original file line number Diff line number Diff line change 22
33from message_passing .introduction import Language
44from message_passing .introduction .workflows import (
5- ApproveInput ,
65 GetLanguagesInput ,
76 SetLanguageInput ,
87 SetLanguageUsingActivityInput ,
@@ -17,4 +16,3 @@ class GreetingService:
1716 set_language_using_activity : nexusrpc .Operation [
1817 SetLanguageUsingActivityInput , Language
1918 ]
20- approve : nexusrpc .Operation [ApproveInput , None ]
You can’t perform that action at this time.
0 commit comments