remove application service version

This commit is contained in:
Emmanuel Garette 2022-07-01 22:13:16 +02:00
parent 6b65f80919
commit 231125be0c

View file

@ -23,22 +23,17 @@ class ModuleCfg():
def list_applications() -> dict: def list_applications() -> dict:
""" """
{<applicationservice>: applicationservice/<release>/<applicationservice> {<applicationservice>: seed/<applicationservice>
""" """
dataset_directory = RISOTTO_CONFIG['directories']['dataset'] dataset_directory = RISOTTO_CONFIG['directories']['dataset']
applications = {} applications = {}
distrib_dir = join(dataset_directory, 'applicationservice') for applicationservice in listdir(dataset_directory):
for release in listdir(distrib_dir): applicationservice_dir = join(dataset_directory, applicationservice)
release_dir = join(distrib_dir, release) if not isdir(applicationservice_dir):
if not isdir(release_dir):
continue continue
for applicationservice in listdir(release_dir): if applicationservice in applications:
applicationservice_dir = join(release_dir, applicationservice) raise Exception(f'multi applicationservice: {applicationservice} ({applicationservice_dir} <=> {applications[applicationservice]})')
if not isdir(applicationservice_dir): applications[applicationservice] = applicationservice_dir
continue
if applicationservice in applications:
raise Exception(f'multi applicationservice: {applicationservice} ({applicationservice_dir} <=> {applications[applicationservice]})')
applications[applicationservice] = applicationservice_dir
return applications return applications