change: add case retry for premium
Signed-off-by: Pakin <pakin.t@forth.co.th>
This commit is contained in:
parent
f365f7d626
commit
cb773ab3ec
1 changed files with 6 additions and 1 deletions
|
|
@ -371,7 +371,7 @@ async fn read(
|
|||
Err(_) => {
|
||||
let lvc = latest_version.clone();
|
||||
// concurrent fetch
|
||||
for i in 1..5 {
|
||||
for i in 1..6 {
|
||||
let latest_version_c = lvc.clone();
|
||||
retry_cnt = i;
|
||||
// retry #1: get from redis
|
||||
|
|
@ -524,6 +524,10 @@ fn get_key_cache(country: String, version: String, is_patch: bool, retry_cnt: i3
|
|||
// do checkout
|
||||
format!("{country}/coffeethai02_{version}.json")
|
||||
}
|
||||
5 => {
|
||||
// checkout case premium
|
||||
format!("{country}/coffeethai02_1{version}.json")
|
||||
}
|
||||
_ => "".to_string(),
|
||||
}
|
||||
}
|
||||
|
|
@ -752,6 +756,7 @@ impl AppState {
|
|||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
println!("Hello, world!");
|
||||
//println!("{}", include_str!("main.rs"));
|
||||
dotenv::dotenv().ok();
|
||||
|
||||
env_logger::init();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue