mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
exposes all the s3 arguments
This commit is contained in:
parent
8a2e8a887f
commit
ecd36b15f0
4 changed files with 70 additions and 7 deletions
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue