mirror of
https://github.com/catdevnull/preciazo.git
synced 2024-11-22 14:16:19 +00:00
mostrar error en url list
This commit is contained in:
parent
72282c71b8
commit
c3b968cf12
1 changed files with 19 additions and 7 deletions
|
@ -329,13 +329,25 @@ impl Auto {
|
|||
async fn download_supermercado(self, supermercado: Supermercado) -> anyhow::Result<()> {
|
||||
{
|
||||
let t0 = now_sec();
|
||||
self.get_and_save_urls(&supermercado).await?;
|
||||
self.inform(&format!(
|
||||
"Downloaded url list {:?} (took {})",
|
||||
&supermercado,
|
||||
now_sec() - t0
|
||||
))
|
||||
.await;
|
||||
match self.get_and_save_urls(&supermercado).await {
|
||||
Ok(_) => {
|
||||
self.inform(&format!(
|
||||
"Downloaded url list {:?} (took {})",
|
||||
&supermercado,
|
||||
now_sec() - t0
|
||||
))
|
||||
.await
|
||||
}
|
||||
Err(err) => {
|
||||
self.inform(&format!(
|
||||
"[{:?}] FAILED url list: {:?} (took {})",
|
||||
&supermercado,
|
||||
err,
|
||||
now_sec() - t0
|
||||
))
|
||||
.await
|
||||
}
|
||||
}
|
||||
}
|
||||
let links: Vec<String> = {
|
||||
let mut links = self.db.get_urls_by_domain(supermercado.host()).await?;
|
||||
|
|
Loading…
Reference in a new issue