File tree Expand file tree Collapse file tree
nexus_sync_operations/caller Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,11 +24,13 @@ async def execute_caller_workflow(
2424 task_queue = TASK_QUEUE ,
2525 workflows = [CallerWorkflow ],
2626 ):
27- await client .execute_workflow (
27+ log = await client .execute_workflow (
2828 CallerWorkflow .run ,
2929 id = str (uuid .uuid4 ()),
3030 task_queue = TASK_QUEUE ,
3131 )
32+ for line in log :
33+ print (line )
3234
3335
3436if __name__ == "__main__" :
Original file line number Diff line number Diff line change 1717@workflow .defn
1818class CallerWorkflow :
1919 @workflow .run
20- async def run (self ) -> None :
20+ async def run (self ) -> list [str ]:
21+ log = []
2122 nexus_client = workflow .create_nexus_client (
2223 service = GreetingService ,
2324 endpoint = NEXUS_ENDPOINT ,
@@ -27,7 +28,7 @@ async def run(self) -> None:
2728 supported_languages = await nexus_client .execute_operation (
2829 GreetingService .get_languages , GetLanguagesInput (include_unsupported = False )
2930 )
30- print (f"supported languages: { supported_languages } " )
31+ log . append (f"supported languages: { supported_languages } " )
3132
3233 # Set language
3334 previous_language = await nexus_client .execute_operation (
@@ -38,4 +39,8 @@ async def run(self) -> None:
3839 await nexus_client .execute_operation (GreetingService .get_language , None )
3940 == Language .ARABIC
4041 )
41- print (f"language changed: { previous_language .name } -> { Language .ARABIC .name } " )
42+ log .append (
43+ f"language changed: { previous_language .name } -> { Language .ARABIC .name } "
44+ )
45+
46+ return log
You can’t perform that action at this time.
0 commit comments