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
Some checks failed
Run Tests on Code / run-tests (push) Has been cancelled
This commit is contained in:
parent
92103e28ba
commit
070eae961a
1 changed files with 5 additions and 1 deletions
|
@ -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(_) => {}
|
||||||
|
|
Loading…
Reference in a new issue