activities.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:heaviside 作者: jhuapl-boss 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号