Skip to content

Commit d8fec8e

Browse files
committed
replaced list_data_ids by get_data_ids
1 parent 597d663 commit d8fec8e

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

xcube/webapi/datasets/context.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -389,15 +389,6 @@ def get_dataset_configs_from_stores(
389389
for store_instance_id in data_store_pool.store_instance_ids:
390390
LOG.info(f"Scanning store {store_instance_id!r}")
391391
data_store_config = data_store_pool.get_store_config(store_instance_id)
392-
393-
# Note by forman: This iterator chaining is inefficient.
394-
# Preferably, we should offer
395-
#
396-
# store_dataset_ids = data_store.get_data_ids(
397-
# data_type=(DATASET_TYPE, MULTI_LEVEL_DATASET_TYPE)
398-
# )
399-
#
400-
401392
store_dataset_configs: list[ServerConfig] = data_store_config.user_data
402393
if store_dataset_configs:
403394
for store_dataset_config in store_dataset_configs:
@@ -410,9 +401,8 @@ def get_dataset_configs_from_stores(
410401
"datasets may cause a long setup time of the server."
411402
)
412403
data_store = data_store_pool.get_store(store_instance_id)
413-
store_dataset_ids = set(
414-
data_store.list_data_ids(data_type=DATASET_TYPE) +
415-
data_store.list_data_ids(data_type=MULTI_LEVEL_DATASET_TYPE)
404+
store_dataset_ids = data_store.get_data_ids(
405+
data_type=DATASET_TYPE
416406
)
417407
for store_dataset_id in store_dataset_ids:
418408
if fnmatch.fnmatch(store_dataset_id, dataset_id_pattern):

0 commit comments

Comments
 (0)