async def compose_greeting(self, sleep_seconds):
     Activity.do_not_complete_on_return()
     thread = threading.Thread(
         target=greeting_activities_thread_func,
         args=(Activity.get_task_token(), sleep_seconds),
     )
     thread.start()
 async def compose_greeting(self):
     global captured_heartbeat_value
     if not self.heartbeated:
         await Activity.heartbeat(HEARTBEAT_VALUE)
         self.heartbeated = True
         raise Exception("Blah")
     else:
         captured_heartbeat_value = Activity.get_heartbeat_details()
         return captured_heartbeat_value
 async def compose_greeting(self):
     global namespace, task_token, workflow_execution
     namespace = Activity.get_namespace()
     task_token = Activity.get_task_token()
     workflow_execution = Activity.get_workflow_execution()
Exemple #4
0
 async def compose_greeting(self, sleep_seconds):
     Activity.do_not_complete_on_return()