<s> from flowy . swf . decision import SWFActivityTaskDecision <EOL> from flowy . swf . decision import SWFWorkflowTaskDecision <EOL> from flowy . swf . history import SWFTaskExecutionHistory <EOL> from flowy . proxy import Proxy <EOL> from flowy . utils import DescCounter <EOL> class SWFActivityProxyFactory ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , identity , name , version , <EOL> task_list = None , <EOL> heartbeat = None , <EOL> schedule_to_close = None , <EOL> schedule_to_start = None , <EOL> start_to_close = None , <EOL> retry = ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ) , <EOL> serialize_input = None , <EOL> deserialize_result = None ) : <EOL> self . identity = identity <EOL> self . name = name <EOL> self . version = version <EOL> self . task_list = task_list <EOL> self . heartbeat = heartbeat <EOL> self . schedule_to_close = schedule_to_close <EOL> self . schedule_to_start = schedule_to_start <EOL> self . start_to_close = start_to_close <EOL> self . retry = retry <EOL> self . serialize_input = serialize_input <EOL> self . deserialize_result = deserialize_result <EOL> def __call__ ( self , decision , execution_history , rate_limit = DescCounter ( ) ) : <EOL> """<STR_LIT>""" <EOL> task_exec_hist = SWFTaskExecutionHistory ( execution_history , self . identity ) <EOL> task_decision = SWFActivityTaskDecision ( decision , execution_history , self , rate_limit ) <EOL> return Proxy ( task_exec_hist , task_decision , self . retry , <EOL> self . serialize_input , self . deserialize_result ) <EOL> class SWFWorkflowProxyFactory ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , identity , name , version , <EOL> task_list = None , <EOL> workflow_duration = None , <EOL> decision_duration = None , <EOL> child_policy = None , <EOL> retry = ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ) , <EOL> serialize_input = None , <EOL> deserialize_result = None ) : <EOL> self . identity = identity <EOL> self . name = name <EOL> self . version = version <EOL> self . task_list = task_list <EOL> self . workflow_duration = workflow_duration <EOL> self . decision_duration = decision_duration <EOL> self . child_policy = child_policy <EOL> self . retry = retry <EOL> self . serialize_input = serialize_input <EOL> self . deserialize_result = deserialize_result <EOL> def __call__ ( self , decision , execution_history , rate_limit ) : <EOL> """<STR_LIT>""" <EOL> task_exec_hist = SWFTaskExecutionHistory ( execution_history , self . identity ) <EOL> task_decision = SWFWorkflowTaskDecision ( decision , execution_history , self , rate_limit ) <EOL> return Proxy ( task_exec_hist , task_decision , self . retry , <EOL> self . serialize_input , self . deserialize_result ) </s>
