From ad992582c0343c88827e1e2a90c15d3b53fe32af Mon Sep 17 00:00:00 2001 From: Sveinung Gundersen Date: Mon, 2 Sep 2024 13:24:07 +0200 Subject: [PATCH] Fixed sorting issue for "restore_outputs" tmp implementation --- src/omnipy/compute/mixins/serialize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/omnipy/compute/mixins/serialize.py b/src/omnipy/compute/mixins/serialize.py index f9ec77e0..43158bdf 100644 --- a/src/omnipy/compute/mixins/serialize.py +++ b/src/omnipy/compute/mixins/serialize.py @@ -199,7 +199,7 @@ def _generate_datetime_str(self): def _all_job_output_file_paths_in_reverse_order_for_last_run( persist_data_dir_path: Path, job_name: str) -> Generator[Path, None, None]: - sorted_date_dirs = iter(sorted(os.listdir(persist_data_dir_path))) + sorted_date_dirs = iter(reversed(sorted(os.listdir(persist_data_dir_path)))) try: last_dir = next(sorted_date_dirs)