fix tokio::fs

This commit is contained in:
Elijah McMorris 2024-08-26 00:03:45 -07:00
parent 64d13fff58
commit 057dcb3308
Signed by: NexVeridian
SSH key fingerprint: SHA256:bsA1SKZxuEcEVHAy3gY1HUeM5ykRJl0U0kQHQn0hMg8
2 changed files with 7 additions and 6 deletions

View file

@ -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)