botoflow.options.
activity_options
(task_list=<class 'botoflow.options._NOT_SET'>, version=<class 'botoflow.options._NOT_SET'>, name=<class 'botoflow.options._NOT_SET'>, heartbeat_timeout=<class 'botoflow.options._NOT_SET'>, schedule_to_start_timeout=<class 'botoflow.options._NOT_SET'>, start_to_close_timeout=<class 'botoflow.options._NOT_SET'>, schedule_to_close_timeout=<class 'botoflow.options._NOT_SET'>, task_priority=<class 'botoflow.options._NOT_SET'>)¶This context manager helps override activity task options.
Please see botoflow.decorators.activity()
for available keyword
arguments and their descriptions.
Example usage:
class ExampleWorkflow(WorkflowDefinition):
@execute(version='1.0', execution_start_to_close_timeout=60)
def execute(self, arg1, arg2):
# override the start_to_close_timeout in all activities in this
# context
with activity_options(start_to_close_timeout=2*MINUTES):
arg_sum = yield BunchOfActivities.sum(arg1, arg2)
return_(arg_sum)
Override activity task options
botoflow.options.
workflow_options
(task_list=<class 'botoflow.options._NOT_SET'>, workflow_id=<class 'botoflow.options._NOT_SET'>, version=<class 'botoflow.options._NOT_SET'>, execution_start_to_close_timeout=<class 'botoflow.options._NOT_SET'>, task_start_to_close_timeout=<class 'botoflow.options._NOT_SET'>, child_policy=<class 'botoflow.options._NOT_SET'>, name=<class 'botoflow.options._NOT_SET'>, data_converter=<class 'botoflow.options._NOT_SET'>, tag_list=<class 'botoflow.options._NOT_SET'>, task_priority=<class 'botoflow.options._NOT_SET'>)¶Using this context manager you can override workflow execution options.
Example:
class MasterWorkflow(WorkflowDefinition):
@execute(version='1.0', execution_start_to_close_timeout=1*MINUTES)
def execute(self, arg1, arg2):
# override the default execution_start_to_close_timeout when
# starting this child workflow
with workflow_options(execution_start_to_close_timeout=4*MINUTES):
arg_sum = yield ChildWorkflow.execute(arg1, arg2)
return_(arg_sum)
Override workflow execution options