mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
remove useless function after health route refacto #1026
This commit is contained in:
parent
5a842ec94a
commit
50f0fbb05c
2 changed files with 3 additions and 21 deletions
|
@ -28,7 +28,6 @@ pub type MainReader = heed::RoTxn<MainT>;
|
|||
pub type UpdateWriter<'a> = heed::RwTxn<'a, UpdateT>;
|
||||
pub type UpdateReader = heed::RoTxn<UpdateT>;
|
||||
|
||||
const UNHEALTHY_KEY: &str = "_is_unhealthy";
|
||||
const LAST_UPDATE_KEY: &str = "last-update";
|
||||
|
||||
pub struct MainT;
|
||||
|
@ -533,23 +532,6 @@ impl Database {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn set_healthy(&self, writer: &mut heed::RwTxn<MainT>) -> MResult<()> {
|
||||
let common_store = self.common_store();
|
||||
common_store.delete::<_, Str>(writer, UNHEALTHY_KEY)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn set_unhealthy(&self, writer: &mut heed::RwTxn<MainT>) -> MResult<()> {
|
||||
let common_store = self.common_store();
|
||||
common_store.put::<_, Str, Unit>(writer, UNHEALTHY_KEY, &())?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn get_health(&self, reader: &heed::RoTxn<MainT>) -> MResult<Option<()>> {
|
||||
let common_store = self.common_store();
|
||||
Ok(common_store.get::<_, Str, Unit>(&reader, UNHEALTHY_KEY)?)
|
||||
}
|
||||
|
||||
pub fn compute_stats(&self, writer: &mut MainWriter, index_uid: &str) -> MResult<()> {
|
||||
let index = match self.open_index(&index_uid) {
|
||||
Some(index) => index,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue