DirkZhao
10/22/2019 - 5:50 AM

测试环境配置获取

def hget():
    host = 'dconfig-agent.qttcs3.cn'
    port = 15000
    pool = redis.ConnectionPool(host=host, port=port)
    r = redis.Redis(connection_pool=pool)

    # 1:debug_page_view:2  应用id(1是qtt)/配置项名/平台(1anroid 2ios)
    key = 'debug_page_view'
    data = r.hget('1:{}:2'.format(key), '{}')
    return data