예제 #1
0
            def decider_local_activity_task(*args, **kwargs):
                """
                Runs the activity task in decider-local mode.

                :param args:
                :param kwargs:
                :return:
                """
                p = Promise()
                p.is_ready = True
                try:
                    p.result = f(*args, **kwargs)
                except Exception as e:
                    p.exception = e
                return p
예제 #2
0
 def decider_local_child_workflow(*args, **kwargs):
     """
     Treats this decision task as a child workflow within another decision task in a serial fashion.
     :param args:
     :param kwargs:
     :return:
     """
     p = Promise()
     p.is_ready = True
     try:
         result = f(*args, **kwargs)
         p.result = result
     except Exception as e:
         p.exception = e
     return p