fix: abort reading_status_match job on AniList 429 rate limit
Continuing after a 429 is pointless — all subsequent requests will also fail. The job now returns Err immediately, which sets status='failed' with a clear message indicating where it stopped. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -369,6 +369,11 @@ pub(crate) async fn process_reading_status_match(
|
||||
insert_result(pool, job_id, library_id, series_name, "ambiguous", None, None, None, None).await;
|
||||
}
|
||||
Err(e) => {
|
||||
if e.contains("429") || e.contains("Too Many Requests") {
|
||||
return Err(format!(
|
||||
"AniList rate limit exceeded (429) — job stopped after {processed}/{total} series"
|
||||
));
|
||||
}
|
||||
warn!("[READING_STATUS_MATCH] series '{series_name}': {e}");
|
||||
insert_result(pool, job_id, library_id, series_name, "error", None, None, None, Some(&e)).await;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user