mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix sqlite database is lock issue by setting busy_timeout and wal mode
This commit is contained in:
@ -22,4 +22,5 @@ phf = { version = "0.8.0", features = ["macros"] }
|
||||
similar = "1.2.2"
|
||||
dialoguer = "0.8.0"
|
||||
toml = "0.5.8"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
pathdiff = "0.2.0"
|
@ -78,6 +78,7 @@ fn parse_files_protobuf(proto_crate_path: &str, proto_output_dir: &str) -> Vec<P
|
||||
|
||||
if !enums.is_empty() || !structs.is_empty() {
|
||||
let info = ProtoFile {
|
||||
file_path: path.clone(),
|
||||
file_name: file_name.clone(),
|
||||
structs: structs.iter().map(|s| s.name.clone()).collect(),
|
||||
enums: enums.iter().map(|e| e.name.clone()).collect(),
|
||||
|
@ -88,6 +88,7 @@ impl ProtobufCrate {
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct ProtoFile {
|
||||
pub file_path: String,
|
||||
pub file_name: String,
|
||||
pub structs: Vec<String>,
|
||||
pub enums: Vec<String>,
|
||||
@ -121,6 +122,7 @@ impl FlutterProtobufInfo {
|
||||
model_dir
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn mod_file_path(&self) -> String {
|
||||
let mod_file_path = format!("{}/protobuf.dart", self.package_path);
|
||||
mod_file_path
|
||||
|
@ -154,3 +154,14 @@ where
|
||||
path_and_name(path, name);
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn suffix_relative_to_path(path: &str, base: &str) -> String {
|
||||
let base = Path::new(base);
|
||||
let path = Path::new(path);
|
||||
path.strip_prefix(base)
|
||||
.unwrap()
|
||||
.to_str()
|
||||
.unwrap()
|
||||
.to_owned()
|
||||
}
|
||||
|
Reference in New Issue
Block a user