mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 20:15:07 +08:00
fix typos
This commit is contained in:
parent
147756750b
commit
b690f1103a
@ -85,7 +85,7 @@ impl IndexController {
|
|||||||
mut payload: Payload,
|
mut payload: Payload,
|
||||||
primary_key: Option<String>,
|
primary_key: Option<String>,
|
||||||
) -> anyhow::Result<UpdateStatus> {
|
) -> anyhow::Result<UpdateStatus> {
|
||||||
let perform_udpate = |uuid| async move {
|
let perform_update = |uuid| async move {
|
||||||
let meta = UpdateMeta::DocumentsAddition {
|
let meta = UpdateMeta::DocumentsAddition {
|
||||||
method,
|
method,
|
||||||
format,
|
format,
|
||||||
@ -93,7 +93,7 @@ impl IndexController {
|
|||||||
};
|
};
|
||||||
let (sender, receiver) = mpsc::channel(10);
|
let (sender, receiver) = mpsc::channel(10);
|
||||||
|
|
||||||
// It is necessary to spawn a local task to senf the payload to the update handle to
|
// It is necessary to spawn a local task to send the payload to the update handle to
|
||||||
// prevent dead_locking between the update_handle::update that waits for the update to be
|
// prevent dead_locking between the update_handle::update that waits for the update to be
|
||||||
// registered and the update_actor that waits for the the payload to be sent to it.
|
// registered and the update_actor that waits for the the payload to be sent to it.
|
||||||
tokio::task::spawn_local(async move {
|
tokio::task::spawn_local(async move {
|
||||||
@ -115,10 +115,10 @@ impl IndexController {
|
|||||||
};
|
};
|
||||||
|
|
||||||
match self.uuid_resolver.get(uid).await {
|
match self.uuid_resolver.get(uid).await {
|
||||||
Ok(uuid) => Ok(perform_udpate(uuid).await?),
|
Ok(uuid) => Ok(perform_update(uuid).await?),
|
||||||
Err(UuidError::UnexistingIndex(name)) => {
|
Err(UuidError::UnexistingIndex(name)) => {
|
||||||
let uuid = Uuid::new_v4();
|
let uuid = Uuid::new_v4();
|
||||||
let status = perform_udpate(uuid).await?;
|
let status = perform_update(uuid).await?;
|
||||||
self.uuid_resolver.insert(name, uuid).await?;
|
self.uuid_resolver.insert(name, uuid).await?;
|
||||||
Ok(status)
|
Ok(status)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user