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<()> {
|
async fn download_supermercado(self, supermercado: Supermercado) -> anyhow::Result<()> {
|
||||||
{
|
{
|
||||||
let t0 = now_sec();
|
let t0 = now_sec();
|
||||||
self.get_and_save_urls(&supermercado).await?;
|
match self.get_and_save_urls(&supermercado).await {
|
||||||
self.inform(&format!(
|
Ok(_) => {
|
||||||
"Downloaded url list {:?} (took {})",
|
self.inform(&format!(
|
||||||
&supermercado,
|
"Downloaded url list {:?} (took {})",
|
||||||
now_sec() - t0
|
&supermercado,
|
||||||
))
|
now_sec() - t0
|
||||||
.await;
|
))
|
||||||
|
.await
|
||||||
|
}
|
||||||
|
Err(err) => {
|
||||||
|
self.inform(&format!(
|
||||||
|
"[{:?}] FAILED url list: {:?} (took {})",
|
||||||
|
&supermercado,
|
||||||
|
err,
|
||||||
|
now_sec() - t0
|
||||||
|
))
|
||||||
|
.await
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
let links: Vec<String> = {
|
let links: Vec<String> = {
|
||||||
let mut links = self.db.get_urls_by_domain(supermercado.host()).await?;
|
let mut links = self.db.get_urls_by_domain(supermercado.host()).await?;
|
||||||
|
|
Loading…
Reference in a new issue