Add kelly_betting_usdt column
This commit is contained in:
parent
704c1ea513
commit
58613d9ba6
|
|
@ -915,6 +915,7 @@ async fn initialize_database() {
|
|||
("available_usdt", "decimal(16,8)", Some("UN")),
|
||||
("is_tradable", "tinyint", Some("UN")),
|
||||
("unit_trade_usdt", "decimal(16,8)", None),
|
||||
("kelly_betting_usdt", "decimal(16,8)", None),
|
||||
];
|
||||
let table_condition = None;
|
||||
|
||||
|
|
@ -927,6 +928,7 @@ async fn initialize_database() {
|
|||
"available_usdt",
|
||||
"is_tradable",
|
||||
"unit_trade_usdt",
|
||||
"kelly_betting_usdt",
|
||||
];
|
||||
let insert_initial_value = vec![
|
||||
String::from("0.0"),
|
||||
|
|
@ -937,6 +939,7 @@ async fn initialize_database() {
|
|||
String::from("0.0"),
|
||||
String::from("0"),
|
||||
String::from("0.0"),
|
||||
String::from("0.0"),
|
||||
];
|
||||
if exists_result == false {
|
||||
let mut result = new_table(&table_name, &initial_table, &table_condition).await;
|
||||
|
|
@ -962,7 +965,7 @@ async fn initialize_database() {
|
|||
}
|
||||
|
||||
if RUNNING_MODE == SIMUL {
|
||||
assets_managing_team::add_extra_usdt(dec!(100000.0)).await;
|
||||
assets_managing_team::add_extra_usdt(dec!(1700.0)).await;
|
||||
assets_managing_team::update_current_total_usdt().await;
|
||||
} else {
|
||||
let mut table_name = String::new();
|
||||
|
|
@ -994,6 +997,7 @@ async fn initialize_database() {
|
|||
assets_managing_team::update_current_total_usdt().await;
|
||||
}
|
||||
assets_managing_team::set_available_usdt().await;
|
||||
assets_managing_team::set_unit_usdt().await;
|
||||
|
||||
println!("Ok");
|
||||
}
|
||||
|
|
@ -1461,11 +1465,12 @@ async fn initialize_database() {
|
|||
sleep(Duration::from_millis(10)).await;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
delete_all_rows(&table_name)
|
||||
.await
|
||||
.expect("Failed to delete rows!");
|
||||
}
|
||||
// else {
|
||||
// delete_all_rows(&table_name)
|
||||
// .await
|
||||
// .expect("Failed to delete rows!");
|
||||
// }
|
||||
println!("Ok");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user