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();
for series in series {
sleep(Duration::seconds(1).to_std().unwrap()).await;
let info_msg = format!("Handling Series {}", series.slug);
info!(info_msg);
if handle_series(&series, &communities, &lemmy, &config, &mut post_history)
@ -122,7 +123,10 @@ async fn idle(start: &DateTime<Utc>, config: &Config) {
if Utc::now() - start > sleep_duration {
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() {
match reqwest::get(status_url).await {
Ok(_) => {}