diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-27 21:40:46 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-27 21:40:46 +0000 |
| commit | 847acdecb9c28a5307123b9ee685b769a598cfc1 (patch) | |
| tree | 4cbfc02c5f4f99c1f12b6d11b210a23669806fd7 /src/purgatory/sync/functions.rs | |
| parent | 51c331f26ad3c8c422b41267e3695c8f2295510e (diff) | |
fix: distinguish 0 OIDs fetched from successful fetch in logging
When fetch_oids returns Ok(vec![]) (all requested OIDs missing from
remote), the log message now says 'Fetch returned no OIDs (not available
on remote)' instead of the misleading 'Fetch succeeded' with oids_fetched=0.
Diffstat (limited to 'src/purgatory/sync/functions.rs')
| -rw-r--r-- | src/purgatory/sync/functions.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/purgatory/sync/functions.rs b/src/purgatory/sync/functions.rs index 65d29af..2b7e71f 100644 --- a/src/purgatory/sync/functions.rs +++ b/src/purgatory/sync/functions.rs | |||
| @@ -369,7 +369,7 @@ pub async fn sync_identifier_from_url<C: SyncContext + ?Sized>( | |||
| 369 | throttle_manager.complete_request(&domain); | 369 | throttle_manager.complete_request(&domain); |
| 370 | 370 | ||
| 371 | let oids_fetched = match fetch_result { | 371 | let oids_fetched = match fetch_result { |
| 372 | Ok(fetched) => { | 372 | Ok(fetched) if !fetched.is_empty() => { |
| 373 | debug!( | 373 | debug!( |
| 374 | identifier = %identifier, | 374 | identifier = %identifier, |
| 375 | url = %url, | 375 | url = %url, |
| @@ -378,6 +378,14 @@ pub async fn sync_identifier_from_url<C: SyncContext + ?Sized>( | |||
| 378 | ); | 378 | ); |
| 379 | fetched.len() | 379 | fetched.len() |
| 380 | } | 380 | } |
| 381 | Ok(_) => { | ||
| 382 | debug!( | ||
| 383 | identifier = %identifier, | ||
| 384 | url = %url, | ||
| 385 | "Fetch returned no OIDs (not available on remote)" | ||
| 386 | ); | ||
| 387 | 0 | ||
| 388 | } | ||
| 381 | Err(e) => { | 389 | Err(e) => { |
| 382 | debug!( | 390 | debug!( |
| 383 | identifier = %identifier, | 391 | identifier = %identifier, |