fix: continue search next retry key if not found

Signed-off-by: Pakin <pakin.t@forth.co.th>
This commit is contained in:
Pakin 2026-03-06 16:44:38 +07:00
parent a5c883dbe6
commit f365f7d626

View file

@ -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);
}
}
}
}