From ab82b058f1eea8025708238710e18ddc6ab42da1 Mon Sep 17 00:00:00 2001 From: Manabu ISHII Date: Sun, 3 Mar 2024 23:10:50 +0900 Subject: [PATCH] Improve to check directory structure Currently sapporo run directory structureis 2chars_of_run_id/run_id/... So we need check run_request.json in this kind of path. --- sapporo/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sapporo/run.py b/sapporo/run.py index 8d20e2a..f9912b1 100644 --- a/sapporo/run.py +++ b/sapporo/run.py @@ -62,7 +62,7 @@ def count_system_state() -> Dict[State, int]: def glob_all_run_ids() -> List[str]: run_base_dir: Path = current_app.config["RUN_DIR"] - run_requests: List[Path] = list(run_base_dir.glob(f"**/{RUN_DIR_STRUCTURE['run_request']}")) + run_requests: List[Path] = list(run_base_dir.glob(f"*/*/{RUN_DIR_STRUCTURE['run_request']}")) run_ids: List[str] = [run_request.parent.name for run_request in run_requests] return run_ids