exposes all the s3 arguments

This commit is contained in:
Tamo 2023-09-13 18:17:56 +02:00
parent 8a2e8a887f
commit ecd36b15f0
4 changed files with 70 additions and 7 deletions

View file

@ -41,6 +41,7 @@ pub fn snapshot_index_scheduler(scheduler: &IndexScheduler) -> String {
planned_failures: _,
run_loop_iteration: _,
zookeeper: _,
options: _,
} = inner.deref();
let rtxn = env.read_txn().unwrap();

View file

@ -468,7 +468,12 @@ impl IndexScheduler {
let s3 = inner.options.s3.as_ref().unwrap();
let task =
s3.get_object(format!("/tasks/{id:0>10}")).unwrap();
assert_eq!(
task.status_code(),
200,
"could not reach the s3: {:?}",
task.as_str()
);
let task = serde_json::from_slice(task.as_slice()).unwrap();
inner.register_raw_task(&mut wtxn, &task).unwrap();
// we received a new tasks, we must wake up
@ -507,6 +512,12 @@ impl IndexScheduler {
.unwrap();
let s3 = inner.options.s3.as_ref().unwrap();
let task = s3.get_object(format!("tasks/{id:0>10}")).unwrap();
assert_eq!(
task.status_code(),
200,
"could not reach the s3: {:?}",
task.as_str()
);
let task = serde_json::from_slice(task.as_slice()).unwrap();
inner.register_raw_task(&mut wtxn, &task).unwrap();
wtxn.commit().unwrap();