main.py 文件源码

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

项目:oscars2016 作者: 0x0ece 项目源码 文件源码
def __init__(self, request=None, response=None):
        """Calls the constructor of the super and does the local setup."""
        super(InitHandler, self).__init__(request, response)
        self.client = pubsub_utils.get_client()
        # self._setup_topic()
        self._setup_subscription()

    # def _setup_topic(self):
    #     """Creates a topic if it does not exist."""
    #     topic_name = pubsub_utils.get_full_topic_name()
    #     try:
    #         self.client.projects().topics().get(
    #             topic=topic_name).execute()
    #     except errors.HttpError as e:
    #         if e.resp.status == 404:
    #             self.client.projects().topics().create(
    #                 name=topic_name, body={}).execute()
    #         else:
    #             logging.exception(e)
    #             raise
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号