solo hacer best selling una vez

This commit is contained in:
Cat /dev/Nulo 2024-01-29 12:25:24 -03:00 committed by Nulo
parent 1c18b20e4d
commit 3a794feb4f

View file

@ -355,14 +355,6 @@ impl Auto {
.await;
}
let best_selling = self
.inform_time(
"Downloaded best selling",
best_selling::get_all_best_selling(&self.pool),
)
.await?;
self.save_best_selling(best_selling).await?;
Ok(())
}
@ -466,6 +458,15 @@ async fn auto_cli() -> anyhow::Result<()> {
.map(|s| tokio::spawn(auto.clone().download_supermercado(s.to_owned())))
.collect();
future::try_join_all(handles).await?;
let best_selling = auto
.inform_time(
"Downloaded best selling",
best_selling::get_all_best_selling(&auto.pool),
)
.await?;
auto.save_best_selling(best_selling).await?;
Ok(())
}
async fn cron_cli() -> anyhow::Result<()> {