model_workers_resource.py 文件源码

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

项目:Cuppa 作者: flipkart-incubator 项目源码 文件源码
def on_get(self, req, resp):
        """Handles GET requests"""
        model_type = req.get_param('model-type')
        resp.status = falcon.HTTP_200  # This is the default status
        if model_type:
            resp.body = str(self.load_balancer.get_model_to_workers_list(model_type))
        else:
            resp.status = falcon.HTTP_400
            raise falcon.HTTPBadRequest("Bad Request", "model-type is missing in query params")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号