Fix formatting in domain manager

This commit is contained in:
Brian Picciano 2023-06-21 14:05:28 +02:00
parent 505015a4bd
commit 5e89d21ce3

View File

@ -156,24 +156,23 @@ async fn sync_origins(origin_store: &dyn origin::store::Store, canceller: Cancel
let mut interval = tokio::time::interval(tokio::time::Duration::from_secs(20 * 60)); let mut interval = tokio::time::interval(tokio::time::Duration::from_secs(20 * 60));
loop { loop {
tokio::select! { tokio::select! {
_ = interval.tick() => { _ = interval.tick() => {
match origin_store.all_descrs() {
match origin_store.all_descrs() { Ok(iter) => iter.into_iter(),
Ok(iter) => iter.into_iter(), Err(err) => {
Err(err) => { log::error!("Error fetching origin descriptors: {err}");
log::error!("Error fetching origin descriptors: {err}"); return;
return; }
} }
.for_each(|descr| {
if let Err(err) = origin_store.sync(descr.clone(), origin::store::Limits {}) {
log::error!("Failed to sync store for {:?}: {err}", descr);
return;
}
});
},
_ = canceller.cancelled() => return,
} }
.for_each(|descr| {
if let Err(err) = origin_store.sync(descr.clone(), origin::store::Limits {}) {
log::error!("Failed to sync store for {:?}: {err}", descr);
return;
}
});
},
_ = canceller.cancelled() => return,
}
} }
} }