mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-12-18 22:21:50 +03:00
Format Rust code using rustfmt
This commit is contained in:
parent
a13f116698
commit
7eb32e55ce
@ -449,7 +449,7 @@ async fn check_caps(
|
||||
}
|
||||
SqliteAction::Backup => {
|
||||
// flushing WALs for backup
|
||||
// check caps.
|
||||
// check caps.
|
||||
for db_ref in open_dbs.iter() {
|
||||
let db = db_ref.value().lock().await;
|
||||
db.execute("pragma wal_checkpoint", [])?;
|
||||
|
10
src/state.rs
10
src/state.rs
@ -222,15 +222,17 @@ async fn handle_request(
|
||||
|
||||
if Path::new(&checkpoint_dir).exists() {
|
||||
fs::remove_dir_all(&checkpoint_dir).await?;
|
||||
}
|
||||
}
|
||||
let checkpoint = Checkpoint::new(&db).map_err(|e| StateError::RocksDBError {
|
||||
action: "BackupCheckpointNew".into(),
|
||||
error: e.to_string(),
|
||||
})?;
|
||||
|
||||
checkpoint.create_checkpoint(&checkpoint_dir).map_err(|e| StateError::RocksDBError {
|
||||
action: "BackupCheckpointCreate".into(),
|
||||
error: e.to_string(),
|
||||
checkpoint.create_checkpoint(&checkpoint_dir).map_err(|e| {
|
||||
StateError::RocksDBError {
|
||||
action: "BackupCheckpointCreate".into(),
|
||||
error: e.to_string(),
|
||||
}
|
||||
})?;
|
||||
|
||||
(serde_json::to_vec(&StateResponse::Backup).unwrap(), None)
|
||||
|
Loading…
Reference in New Issue
Block a user