elif a is not None: result = a * a if sleep is not None and RECORDING: time.sleep(sleep) if heartbeat: hb() if err is not None: raise RuntimeError(err) return result empty_conf = SWFWorkflowConfig(default_task_list=TASKLIST, default_decision_duration=10, default_workflow_duration=20, default_child_policy='TERMINATE', ) empty_conf.conf_activity('activity', VERSION, 'tactivity') @empty_conf(version=VERSION) class TWorkflow(object): def __init__(self, activity): pass def __call__(self, a=None, b=None, sleep=None, heartbeat=False, err=None): dummy_heartbeat = lambda: True return tactivity(dummy_heartbeat, a, b, sleep, heartbeat, err) conf_use_activities = SWFWorkflowConfig(default_task_list=TASKLIST, default_decision_duration=10, default_workflow_duration=60,
if sleep is not None and RECORDING: time.sleep(sleep) if heartbeat: hb() if err is not None: raise RuntimeError(err) return result empty_conf = SWFWorkflowConfig( default_task_list=TASKLIST, default_decision_duration=10, default_workflow_duration=20, default_child_policy="TERMINATE", ) empty_conf.conf_activity("activity", VERSION, "tactivity") @empty_conf(version=VERSION) class TWorkflow(object): def __init__(self, activity): pass def __call__(self, a=None, b=None, sleep=None, heartbeat=False, err=None): dummy_heartbeat = lambda: True return tactivity(dummy_heartbeat, a, b, sleep, heartbeat, err) conf_use_activities = SWFWorkflowConfig( default_task_list=TASKLIST, default_decision_duration=10,
from flowy import SWFWorkflowConfig from flowy import SWFWorkflowWorker from flowy.tests.workflows import * no_activity_workflow = SWFWorkflowConfig() task_activity_workflow = SWFWorkflowConfig() task_activity_workflow.conf_activity('task', version=1) task_activity_workflow_rl = SWFWorkflowConfig(rate_limit=3) task_activity_workflow_rl.conf_activity('task', version=1) sa_workflow_custom_timers = SWFWorkflowConfig() sa_workflow_custom_timers.conf_activity('task', version=1, heartbeat=10, schedule_to_start=11, schedule_to_close=12, start_to_close=13, task_list='TL', ) sa_workflow_custom_timers_W = SWFWorkflowConfig() sa_workflow_custom_timers_W.conf_workflow('task', version=1, decision_duration=10, workflow_duration=11, task_list='TL', child_policy='TERMINATE') task_red_activities_workflow = SWFWorkflowConfig() task_red_activities_workflow.conf_activity('task', version=1)
from flowy import SWFWorkflowConfig from flowy import SWFWorkflowWorker from workflows import * no_activity_workflow = SWFWorkflowConfig() task_activity_workflow = SWFWorkflowConfig() task_activity_workflow.conf_activity('task', version=1) task_activity_workflow_rl = SWFWorkflowConfig(rate_limit=3) task_activity_workflow_rl.conf_activity('task', version=1) sa_workflow_custom_timers = SWFWorkflowConfig() sa_workflow_custom_timers.conf_activity( 'task', version=1, heartbeat=10, schedule_to_start=11, schedule_to_close=12, start_to_close=13, task_list='TL', ) sa_workflow_custom_timers_W = SWFWorkflowConfig() sa_workflow_custom_timers_W.conf_workflow('task', version=1, decision_duration=10, workflow_duration=11, task_list='TL', child_policy='TERMINATE')
if sleep is not None and RECORDING: time.sleep(sleep) if heartbeat: hb() if err is not None: raise RuntimeError(err) return result empty_conf = SWFWorkflowConfig( default_task_list=TASKLIST, default_decision_duration=10, default_workflow_duration=20, default_child_policy='TERMINATE', ) empty_conf.conf_activity('activity', VERSION, 'tactivity') @empty_conf(version=VERSION) class TWorkflow(object): def __init__(self, activity): pass def __call__(self, a=None, b=None, sleep=None, heartbeat=False, err=None): dummy_heartbeat = lambda: True return tactivity(dummy_heartbeat, a, b, sleep, heartbeat, err) conf_use_activities = SWFWorkflowConfig(default_task_list=TASKLIST, default_decision_duration=10, default_workflow_duration=60,