Delete unused function
This commit is contained in:
parent
f7048b0c9a
commit
f9c6f0dce1
|
|
@ -18,64 +18,11 @@ const STRATEGIST_NUMBER: u32 = 16;
|
||||||
|
|
||||||
pub async fn initialization() {
|
pub async fn initialization() {
|
||||||
println!("- - - initialization start - - -");
|
println!("- - - initialization start - - -");
|
||||||
// initialize_folders().await;
|
|
||||||
initialize_webdriver().await;
|
initialize_webdriver().await;
|
||||||
initialize_database().await;
|
initialize_database().await;
|
||||||
println!("- - - initialization done - - -");
|
println!("- - - initialization done - - -");
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn initialize_folders() {
|
|
||||||
{
|
|
||||||
println!(">>> Remove folders...");
|
|
||||||
let dir_vec = vec!["datapoints", "indicators", "images"];
|
|
||||||
for dir_element in dir_vec {
|
|
||||||
print!("/{}...", dir_element);
|
|
||||||
io::stdout().flush();
|
|
||||||
match remove_dir_all(dir_element).await {
|
|
||||||
Ok(()) => {}
|
|
||||||
Err(ref error) => match error.kind() {
|
|
||||||
ErrorKind::NotFound => {}
|
|
||||||
other_error => panic!("Failed to remove dir!"),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
println!("Ok");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
println!(">>> Check directory...");
|
|
||||||
let dir_vec = vec![
|
|
||||||
"datapoints",
|
|
||||||
"datapoints/price",
|
|
||||||
"indicators",
|
|
||||||
"indicators/sma",
|
|
||||||
"indicators/ema",
|
|
||||||
"indicators/tema",
|
|
||||||
"indicators/bollingerband",
|
|
||||||
"indicators/rsi",
|
|
||||||
"images",
|
|
||||||
];
|
|
||||||
for element in dir_vec {
|
|
||||||
print!("/{}...", element);
|
|
||||||
io::stdout().flush();
|
|
||||||
|
|
||||||
let result_read_dir = read_dir(element).await;
|
|
||||||
match result_read_dir {
|
|
||||||
Err(E) => {
|
|
||||||
create_dir(element).await.expect("Failed to create dir!");
|
|
||||||
}
|
|
||||||
Ok(T) => {}
|
|
||||||
}
|
|
||||||
let mut result_read_dir = read_dir(element).await;
|
|
||||||
while let Err(e) = result_read_dir {
|
|
||||||
result_read_dir = read_dir(element).await;
|
|
||||||
sleep(Duration::from_millis(100));
|
|
||||||
}
|
|
||||||
println!("Ok");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async fn initialize_webdriver() {
|
async fn initialize_webdriver() {
|
||||||
print!("Open webdriver...");
|
print!("Open webdriver...");
|
||||||
io::stdout().flush();
|
io::stdout().flush();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user