From 719fdd701b9047693befe094f5193872f8a0de22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 7 Sep 2023 11:31:18 +0200 Subject: [PATCH] Fix and crash when the tasks path is unknown --- index-scheduler/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index 00dc6e8b1..18dea48b0 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -422,9 +422,11 @@ impl IndexScheduler { tempfile::NamedTempFile::new_in(inner.env.path()).unwrap(); log::info!("Downloading the index scheduler database."); - let tasks_snapshot = format!("{snapshot_dir}/tasks.mdb"); - s3.get_object_to_writer(tasks_snapshot, &mut tasks_file) + let tasks_snapshot = format!("{snapshot_dir}.tasks.mdb"); + let status = s3 + .get_object_to_writer(tasks_snapshot, &mut tasks_file) .unwrap(); + assert!(matches!(status, 200 | 202)); log::info!("Downloading the indexes databases"); let indexes_files =