def normalized_name(name, unique_id):
    base_name = 'airflow_' + ''.join(c if VALID_NAME_REGEX.match(c) else '_'
                                     for c in name)
    if not unique_id:
        return base_name
    else:
        return base_name + '_' + str(unique_id)
Esempio n. 2
0
def normalized_name(name, unique_id):
    base_name = "airflow_" + "".join(c if VALID_NAME_REGEX.match(c) else "_"
                                     for c in name)
    if not unique_id:
        return base_name
    else:
        return base_name + "_" + str(unique_id)