fix: continue search next retry key if not found
Signed-off-by: Pakin <pakin.t@forth.co.th>
This commit is contained in:
parent
a5c883dbe6
commit
f365f7d626
1 changed files with 13 additions and 8 deletions
21
src/main.rs
21
src/main.rs
|
|
@ -424,15 +424,20 @@ async fn read(
|
|||
"".to_string()
|
||||
}
|
||||
};
|
||||
let recipe: Recipe = serde_json::from_str(&content)?;
|
||||
let recipe = serde_json::from_str::<Recipe>(&content);
|
||||
|
||||
throttle_send_recipe(
|
||||
&recipe,
|
||||
&tx,
|
||||
recipe_param.clone().country,
|
||||
latest_version_c.clone(),
|
||||
)
|
||||
.await;
|
||||
if let Ok(rp) = recipe {
|
||||
throttle_send_recipe(
|
||||
&rp,
|
||||
&tx,
|
||||
recipe_param.clone().country,
|
||||
latest_version_c.clone(),
|
||||
)
|
||||
.await;
|
||||
break;
|
||||
} else {
|
||||
info!("fail to deserialize: {}", content);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue