def __init__(self, name, target=None, **kwargs):
"""
Args:
name (string): Name of the activity to monitor
The activity's ARN is looked up in AWS using the provided
AWS credentials
target (string|callable): Function to pass to TaskProcess as the target,
If string, the class / function will be imported
kwargs (dict): Same arguments as utils.create_session()
"""
super(ActivityProcess, self).__init__(name=name)
self.name = name
self.credentials = kwargs
self.session, self.account_id = create_session(**kwargs)
self.client = self.session.client('stepfunctions', config=Config(read_timeout=70))
self.log = logging.getLogger(__name__)
self.max_concurrent = 0
self.poll_delay = 1
if isinstance(target, str):
target = TaskProcess.resolve_function(target)
self.target = target
评论列表
文章目录