mirror of
https://github.com/NexVeridian/wikidata-to-surrealdb.git
synced 2025-09-02 09:59:13 +00:00
fix tokio::fs
This commit is contained in:
parent
64d13fff58
commit
057dcb3308
2 changed files with 7 additions and 6 deletions
11
src/utils.rs
11
src/utils.rs
|
@ -184,11 +184,12 @@ pub async fn create_db_entities_bulk_filter(
|
|||
.map(char::from)
|
||||
.collect();
|
||||
|
||||
db_mem
|
||||
.export(format!("../data/temp/{}.surql", file_name))
|
||||
.await?;
|
||||
db.import(format!("../data/temp{}.surql", file_name))
|
||||
.await?;
|
||||
let file_path = format!("data/temp/{}.surql", file_name);
|
||||
|
||||
db_mem.export(&file_path).await?;
|
||||
db.import(&file_path).await?;
|
||||
|
||||
tokio::fs::remove_file(&file_path).await?;
|
||||
|
||||
if let Some(ref p) = pb {
|
||||
p.inc(batch_size as u64)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue