turn off synchronous mode during fs resyncs
parent
99c4a4e488
commit
4b1a8c862c
|
@ -97,6 +97,9 @@ fn _rescan_vault<T: AsRef<Path>>(
|
|||
// Initialize types, etc...
|
||||
initialize_types(&pool)?;
|
||||
|
||||
// Disable syncing in SQLite for the duration of the import
|
||||
pool.get()?.execute("PRAGMA synchronous = OFF;")?;
|
||||
|
||||
// Walk through the vault, find all paths
|
||||
let path_entries: Vec<PathBuf> = WalkDir::new(&directory)
|
||||
.follow_links(true)
|
||||
|
@ -178,6 +181,9 @@ fn _rescan_vault<T: AsRef<Path>>(
|
|||
)
|
||||
}
|
||||
|
||||
// Re-enable SQLite syncing
|
||||
pool.get()?.execute("PRAGMA synchronous = NORMAL;")?;
|
||||
|
||||
info!(
|
||||
"Finished updating {} ({} created, {} deleted, {} left unchanged). Took {}s.",
|
||||
directory.as_ref().display(),
|
||||
|
|
Loading…
Reference in New Issue