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")
model_workers_resource.py 文件源码
python
阅读 13
收藏 0
点赞 0
评论 0
评论列表
文章目录