mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-24 06:39:58 -07:00
global: snapshot
This commit is contained in:
@@ -64,7 +64,10 @@ impl<T: PriceSource> TrackedSource<T> {
|
||||
}
|
||||
|
||||
/// Try to fetch, tracking health state
|
||||
fn try_fetch<R>(&mut self, fetch: impl FnOnce(&mut T) -> Option<Result<R>>) -> Option<Result<R>> {
|
||||
fn try_fetch<R>(
|
||||
&mut self,
|
||||
fetch: impl FnOnce(&mut T) -> Option<Result<R>>,
|
||||
) -> Option<Result<R>> {
|
||||
if !self.is_healthy() {
|
||||
return Some(Err(Error::FetchFailed(format!(
|
||||
"{} temporarily disabled (recheck in {}s)",
|
||||
|
||||
Reference in New Issue
Block a user