__init__.py 文件源码

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

项目:elasticsearch-django 作者: yunojuno 项目源码 文件源码
def handle(self, *args, **options):
        """Run do_index_command on each specified index and log the output."""
        for index in options.pop('indexes'):
            data = {}
            try:
                data = self.do_index_command(index, **options)
            except TransportError as ex:
                logger.warning("ElasticSearch threw an error: %s", ex)
                data = {
                    "index": index,
                    "status": ex.status_code,
                    "reason": ex.error,
                }
            finally:
                logger.info(data)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号