utilities.py 文件源码

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

项目:PollBot 作者: mozilla 项目源码 文件源码
def heartbeat(request):
    info = await asyncio.gather(archives.heartbeat(),
                                balrog.heartbeat(),
                                bedrock.heartbeat(),
                                bouncer.heartbeat(),
                                buildhub.heartbeat(),
                                crash_stats.heartbeat(),
                                product_details.heartbeat(),
                                telemetry.heartbeat())
    status = all(info) and 200 or 503
    return web.json_response({"archive": info[0],
                              "balrog": info[1],
                              "bedrock": info[2],
                              "bouncer": info[3],
                              "buildhub": info[4],
                              "crash-stats": info[5],
                              "product-details": info[6],
                              "telemetry": info[7]},
                             status=status)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号