mirror of
https://github.com/NexVeridian/wikidata-to-surrealdb.git
synced 2025-09-02 09:59:13 +00:00
refactor init_db and init_progress_bar
This commit is contained in:
parent
731df97cd2
commit
2ded1d5b1b
8 changed files with 103 additions and 134 deletions
|
@ -3,6 +3,7 @@ use lazy_static::lazy_static;
|
|||
use std::{env, io::BufRead};
|
||||
use surrealdb::{engine::remote::ws::Client, Surreal};
|
||||
use tokio::time::{sleep, Duration};
|
||||
|
||||
mod utils;
|
||||
use utils::*;
|
||||
|
||||
|
@ -35,9 +36,9 @@ pub enum CreateMode {
|
|||
#[tokio::main]
|
||||
async fn main() -> Result<(), Error> {
|
||||
sleep(Duration::from_secs(10)).await;
|
||||
let pb = create_pb().await;
|
||||
let pb = init_progress_bar::create_pb().await;
|
||||
|
||||
let db = create_db_ws().await?;
|
||||
let db = init_db::create_db_ws().await?;
|
||||
let reader = File_Format::new(&WIKIDATA_FILE_FORMAT).reader(&WIKIDATA_FILE_NAME)?;
|
||||
|
||||
match *CREATE_MODE {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue