From 3a794feb4fa51b5acc99f8d058f2d171b38aba56 Mon Sep 17 00:00:00 2001 From: Nulo Date: Mon, 29 Jan 2024 12:25:24 -0300 Subject: [PATCH] solo hacer best selling una vez --- scraper-rs/src/main.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/scraper-rs/src/main.rs b/scraper-rs/src/main.rs index 47e2055..308f0eb 100644 --- a/scraper-rs/src/main.rs +++ b/scraper-rs/src/main.rs @@ -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<()> {