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();
|
||||
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(_) => {}
|
||||
|
|
Loading…
Reference in a new issue