tenant.py 文件源码

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

项目:drift 作者: dgnorth 项目源码 文件源码
def tenants_report():
    print "The following tenants are registered in config on tier '{}':".format(get_tier_name())
    config = load_config()
    for tenant_config in config.get("tenants", []):
        name = tenant_config["name"]
        # TODO: Get rid of this
        if name == "*":
            continue
        sys.stdout.write("   {}... ".format(name))
        db_error = db_check(tenant_config)
        if not db_error:
            print Fore.GREEN + "OK"
        else:
            if "does not exist" in db_error:
                print Fore.RED + "FAIL! DB does not exist"
            else:
                print Fore.RED + "Error: %s" % db_error
    print "To view more information about each tenant run this command again with the tenant name"
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号