coto leeento

scrapear coto mas lento #50
This commit is contained in:
Cat /dev/Nulo 2024-09-21 21:24:17 -03:00
parent 8e69bb85bc
commit a368f2e625
2 changed files with 4 additions and 1 deletions

View file

@ -68,7 +68,7 @@ impl Auto {
let t0 = now_sec(); let t0 = now_sec();
let n_coroutines = if supermercado == Supermercado::Coto { let n_coroutines = if supermercado == Supermercado::Coto {
50 10
} else { } else {
env::var("N_COROUTINES") env::var("N_COROUTINES")
.map_or(Ok(24), |s| s.parse::<usize>()) .map_or(Ok(24), |s| s.parse::<usize>())

View file

@ -125,6 +125,9 @@ impl Scraper {
tracing::error!(error=%err, url=url); tracing::error!(error=%err, url=url);
} }
} }
if url.contains("cotodigital") {
tokio::time::sleep(tokio::time::Duration::from_secs(2)).await;
}
counters counters
} }