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 =