mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-23 05:14:27 +01:00
non local udpate actor
This commit is contained in:
parent
f090f42e7a
commit
c2282ab5cb
@ -140,7 +140,7 @@ pub struct UpdateActorHandle<D> {
|
|||||||
|
|
||||||
impl<D> UpdateActorHandle<D>
|
impl<D> UpdateActorHandle<D>
|
||||||
where
|
where
|
||||||
D: AsRef<[u8]> + Sized + 'static,
|
D: AsRef<[u8]> + Sized + 'static + Sync + Send,
|
||||||
{
|
{
|
||||||
pub fn new(index_handle: IndexActorHandle, path: impl AsRef<Path>) -> Self {
|
pub fn new(index_handle: IndexActorHandle, path: impl AsRef<Path>) -> Self {
|
||||||
let path = path.as_ref().to_owned().join("updates");
|
let path = path.as_ref().to_owned().join("updates");
|
||||||
@ -148,7 +148,7 @@ where
|
|||||||
let store = MapUpdateStoreStore::new(index_handle, &path);
|
let store = MapUpdateStoreStore::new(index_handle, &path);
|
||||||
let actor = UpdateActor::new(store, receiver, path);
|
let actor = UpdateActor::new(store, receiver, path);
|
||||||
|
|
||||||
tokio::task::spawn_local(actor.run());
|
tokio::task::spawn(actor.run());
|
||||||
|
|
||||||
Self { sender }
|
Self { sender }
|
||||||
}
|
}
|
||||||
@ -207,5 +207,3 @@ impl UpdateStoreStore for MapUpdateStoreStore {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user