fix: move back to sled stable
This commit is contained in:
parent
84f4ce73e5
commit
044e65afcc
4 changed files with 68 additions and 74 deletions
|
@ -108,7 +108,7 @@ impl Database {
|
|||
pub async fn load_or_create(config: Config) -> Result<Self> {
|
||||
let db = sled::Config::default()
|
||||
.path(&config.database_path)
|
||||
.cache_capacity(config.cache_capacity as usize)
|
||||
.cache_capacity(config.cache_capacity as u64)
|
||||
.use_compression(true)
|
||||
.open()?;
|
||||
|
||||
|
@ -301,7 +301,8 @@ impl Database {
|
|||
}
|
||||
|
||||
pub async fn flush(&self) -> Result<()> {
|
||||
self._db.flush_async().await?;
|
||||
// noop while we don't use sled 1.0
|
||||
//self._db.flush_async().await?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -211,10 +211,12 @@ impl Sending {
|
|||
};
|
||||
},
|
||||
Some(event) = &mut subscriber => {
|
||||
for (_tree, key, value_opt) in &event {
|
||||
if value_opt.is_none() {
|
||||
continue;
|
||||
}
|
||||
if let sled::Event::Insert { key, .. } = event {
|
||||
// New sled version:
|
||||
//for (_tree, key, value_opt) in &event {
|
||||
// if value_opt.is_none() {
|
||||
// continue;
|
||||
// }
|
||||
|
||||
let servernamepduid = key.clone();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue