Disable using webdriver
This commit is contained in:
parent
70e6b7c690
commit
cbbfac0162
|
|
@ -19,7 +19,7 @@ const STRATEGIST_NUMBER: u32 = 16;
|
||||||
|
|
||||||
pub async fn initialization() {
|
pub async fn initialization() {
|
||||||
println!("- - - initialization start - - -");
|
println!("- - - initialization start - - -");
|
||||||
initialize_webdriver().await;
|
// initialize_webdriver().await;
|
||||||
initialize_database().await;
|
initialize_database().await;
|
||||||
println!("- - - initialization done - - -");
|
println!("- - - initialization done - - -");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
128
src/main.rs
128
src/main.rs
|
|
@ -936,39 +936,39 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// Task#11: monitoring total market cap
|
// Task#11: monitoring total market cap
|
||||||
if RUNNING_MODE == REAL || RUNNING_MODE == SIMUL || RUNNING_MODE == TEST {
|
// if RUNNING_MODE == REAL || RUNNING_MODE == SIMUL || RUNNING_MODE == TEST {
|
||||||
tokio::task::spawn(async move {
|
// tokio::task::spawn(async move {
|
||||||
loop {
|
// loop {
|
||||||
let result = signal_association::coinmarketcap::market_cap_index().await;
|
// let result = signal_association::coinmarketcap::market_cap_index().await;
|
||||||
match result {
|
// match result {
|
||||||
Ok(T) => {
|
// Ok(T) => {
|
||||||
tx_task11
|
// tx_task11
|
||||||
.send(11)
|
// .send(11)
|
||||||
.expect("The mpsc channel has been closed.");
|
// .expect("The mpsc channel has been closed.");
|
||||||
}
|
// }
|
||||||
Err(E) => {}
|
// Err(E) => {}
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Task#12: monitoring foreign exchange rate
|
// Task#12: monitoring foreign exchange rate
|
||||||
if RUNNING_MODE == REAL || RUNNING_MODE == SIMUL {
|
// if RUNNING_MODE == REAL || RUNNING_MODE == SIMUL {
|
||||||
tokio::task::spawn(async move {
|
// tokio::task::spawn(async move {
|
||||||
loop {
|
// loop {
|
||||||
let result = signal_association::exchange_rate::monitoring_fx_rate_index().await;
|
// let result = signal_association::exchange_rate::monitoring_fx_rate_index().await;
|
||||||
match result {
|
// match result {
|
||||||
Ok(T) => {
|
// Ok(T) => {
|
||||||
tx_task12
|
// tx_task12
|
||||||
.send(12)
|
// .send(12)
|
||||||
.expect("The mpsc channel has been closed.");
|
// .expect("The mpsc channel has been closed.");
|
||||||
}
|
// }
|
||||||
Err(E) => {}
|
// Err(E) => {}
|
||||||
}
|
// }
|
||||||
sleep(Duration::from_secs(2700)).await; // sleep for 45mins
|
// sleep(Duration::from_secs(2700)).await; // sleep for 45mins
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
// // // Task#13: monitoring dollar index
|
// // // Task#13: monitoring dollar index
|
||||||
// // tokio::task::spawn(async move {
|
// // tokio::task::spawn(async move {
|
||||||
|
|
@ -986,43 +986,43 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
// // });
|
// // });
|
||||||
|
|
||||||
// Task#14: monitoring signal decision
|
// Task#14: monitoring signal decision
|
||||||
if RUNNING_MODE == REAL || RUNNING_MODE == SIMUL || RUNNING_MODE == TEST {
|
// if RUNNING_MODE == REAL || RUNNING_MODE == SIMUL || RUNNING_MODE == TEST {
|
||||||
tokio::task::spawn(async move {
|
// tokio::task::spawn(async move {
|
||||||
loop {
|
// loop {
|
||||||
let result =
|
// let result =
|
||||||
signal_association::signal_decision::monitoring_signal_decision().await;
|
// signal_association::signal_decision::monitoring_signal_decision().await;
|
||||||
match result {
|
// match result {
|
||||||
Ok(T) => {
|
// Ok(T) => {
|
||||||
tx_task14
|
// tx_task14
|
||||||
.send(14)
|
// .send(14)
|
||||||
.expect("The mpsc channel has been closed.");
|
// .expect("The mpsc channel has been closed.");
|
||||||
}
|
// }
|
||||||
Err(E) => {}
|
// Err(E) => {}
|
||||||
}
|
// }
|
||||||
|
|
||||||
sleep(Duration::from_millis(500)).await; // sleep for 0.5sec
|
// sleep(Duration::from_millis(500)).await; // sleep for 0.5sec
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Task#15: monitoring future ratio
|
// Task#15: monitoring future ratio
|
||||||
if RUNNING_MODE == REAL || RUNNING_MODE == SIMUL || RUNNING_MODE == TEST {
|
// if RUNNING_MODE == REAL || RUNNING_MODE == SIMUL || RUNNING_MODE == TEST {
|
||||||
tokio::task::spawn(async move {
|
// tokio::task::spawn(async move {
|
||||||
loop {
|
// loop {
|
||||||
let result = signal_association::future_ratio::monitoring_future_ratio().await;
|
// let result = signal_association::future_ratio::monitoring_future_ratio().await;
|
||||||
match result {
|
// match result {
|
||||||
Ok(T) => {
|
// Ok(T) => {
|
||||||
tx_task15
|
// tx_task15
|
||||||
.send(15)
|
// .send(15)
|
||||||
.expect("The mpsc channel has been closed.");
|
// .expect("The mpsc channel has been closed.");
|
||||||
}
|
// }
|
||||||
Err(E) => {}
|
// Err(E) => {}
|
||||||
}
|
// }
|
||||||
|
|
||||||
sleep(Duration::from_secs(60)).await; // sleep for 1min
|
// sleep(Duration::from_secs(60)).await; // sleep for 1min
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
// COEX part
|
// COEX part
|
||||||
// Task#16: execute strategis for buy
|
// Task#16: execute strategis for buy
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user