コード例 #1
0
def initialize_parameters(export_file,server_config):
    file = open(export_file,'a+')
    common_utils.file_write_format(file, "ags_pms.conf: " + str(server_config))
    file.write("\n")
    print("")

    conns = common_utils.get_server_conns_params(server_config)

    common_utils.file_write_format(file, "conns:" + str(conns))

    if conns != None:
        url = conns['url']
        username = conns['username']
        password = conns['password']


    settings = common_utils.get_config_params(server_config)

    common_utils.file_write_format(file, "settins:" + str(settings))

    if settings != None:
        repair_times = settings['repair_times']

    file.close()
    return url,username,password,repair_times
def initialize_parameters(export_file, server_config):
    file = open(export_file, 'a+')
    common_utils.file_write_format(file, "ags_pms.conf: " + str(server_config))
    file.write("\n")
    print("")

    conns = common_utils.get_server_conns_params(server_config)

    common_utils.file_write_format(file, "conns:" + str(conns))

    if conns != None:
        url = conns['url']
        username = conns['username']
        password = conns['password']

    # settings = common_utils.get_config_params(server_config)
    settings = common_utils.get_config_params(server_config)

    if settings != None:
        folder = settings['folder']
        start_num = settings['start_num']
        service_count = settings['service_count']
        service_name_prefix = settings['service_name_prefix']

    common_utils.file_write_format(file, "settings:" + str(settings))

    file.close()
    return url, username, password, folder, start_num, service_count, service_name_prefix