activities.py 文件源码

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

项目:heaviside 作者: jhuapl-boss 项目源码 文件源码
def success(self, output):
        """Marks the task successfully complete and returns the processed data

        Note: This method will silently fail if the task has timed out

        Args:
            output (string|dict): Json response to return to the state machine
        """
        if self.token is None:
            raise Exception("Not currently working on a task")

        output = json.dumps(output)

        try:
            resp = self.client.send_task_success(taskToken = self.token,
                                                 output = output)
        except ClientError as e:
            # eat the timeout
            if not self.is_timeout(e):
                self.log.exception("Error sending task success")
                raise
        finally:
            self.token = None # finished with task
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号