def process_directories()

in source/ecs/workspaces_app.py [0:0]


def process_directories(workspaces_regions):
    """
    :param: List of AWS regions.
    This method processes all the workspaces for the given list of AWS regions.
    """
    log.debug("Processing the workspaces for the list of regions {}".format(workspaces_regions))
    global total_workspaces, aggregated_csv, directory_count
    for region in workspaces_regions:
        list_directories = get_workspaces_directories(region)
        for directory in list_directories:
            log.debug("Processing the directory {}".format(directory))
            directory_count = directory_count + 1
            directory_params = {
                "DirectoryId": directory["DirectoryId"],
                "Region": region,
                "EndTime": end_time,
                "StartTime": start_time,
                "LastDay": str(last_day),
                "RunUUID": run_uuid,
                "AnonymousDataEndpoint": metrics_endpoint
            }
            directory_reader = DirectoryReader()
            workspace_count, list_workspaces, directory_csv = directory_reader.process_directory(region, stack_parameters, directory_params)
            total_workspaces = total_workspaces + workspace_count
            list_workspaces_processed.append(list_workspaces)
            aggregated_csv = aggregated_csv + directory_csv