Yet more logging and delay between series handling requests (should avoid potential rate limit)
Some checks failed
Run Tests on Code / run-tests (push) Has been cancelled

This commit is contained in:
Neshura 2024-05-06 22:36:17 +02:00
parent 92103e28ba
commit 070eae961a
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C

View file

@ -102,6 +102,7 @@ pub(crate) async fn run() {
let series = config.series.clone(); let series = config.series.clone();
for series in series { for series in series {
sleep(Duration::seconds(1).to_std().unwrap()).await;
let info_msg = format!("Handling Series {}", series.slug); let info_msg = format!("Handling Series {}", series.slug);
info!(info_msg); info!(info_msg);
if handle_series(&series, &communities, &lemmy, &config, &mut post_history) if handle_series(&series, &communities, &lemmy, &config, &mut post_history)
@ -123,6 +124,9 @@ async fn idle(start: &DateTime<Utc>, config: &Config) {
sleep_duration = Duration::seconds(60); sleep_duration = Duration::seconds(60);
} }
let info_msg = format!("Idling for {} seconds", sleep_duration);
info!(info_msg);
if let Some(status_url) = config.status_post_url.clone() { if let Some(status_url) = config.status_post_url.clone() {
match reqwest::get(status_url).await { match reqwest::get(status_url).await {
Ok(_) => {} Ok(_) => {}