From 5e89d21ce3a5ed572832697385eb3b32d82bfc4f Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Wed, 21 Jun 2023 14:05:28 +0200 Subject: [PATCH] Fix formatting in domain manager --- src/domain/manager.rs | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/domain/manager.rs b/src/domain/manager.rs index f18066a..54915a5 100644 --- a/src/domain/manager.rs +++ b/src/domain/manager.rs @@ -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)); loop { tokio::select! { - _ = interval.tick() => { - - match origin_store.all_descrs() { - Ok(iter) => iter.into_iter(), - Err(err) => { - log::error!("Error fetching origin descriptors: {err}"); - return; + _ = interval.tick() => { + match origin_store.all_descrs() { + Ok(iter) => iter.into_iter(), + Err(err) => { + log::error!("Error fetching origin descriptors: {err}"); + 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, - } } }