diff --git a/README.md b/README.md index 6dc498a84..62465a0a4 100644 --- a/README.md +++ b/README.md @@ -93,8 +93,9 @@ If you'd like to have your own instance hosted for you please contact [hosting@b - 2 separate dedicated servers (1 GB/s each) with different ISPs and Cloudflare integration for enhanced performance and optimal availability - 99.9% SLA -- Direct communication for feature requests and support +- Configurated for speed (`raw + eager`) - Updates delivered at your convenience +- Direct communication for feature requests and support - Optional subdomains: `*.bitcoinresearchkit.org`, `*.kibo.money` and `*.satonomics.xyz` - Logo featured in the Readme if desired diff --git a/crates/brk_vec/src/variants/computed.rs b/crates/brk_vec/src/variants/computed.rs index bdab1cbc8..5ac7eb20f 100644 --- a/crates/brk_vec/src/variants/computed.rs +++ b/crates/brk_vec/src/variants/computed.rs @@ -1,4 +1,4 @@ -use std::{path::Path, time::Duration}; +use std::{fs, path::Path, time::Duration}; use brk_exit::Exit; use clap_derive::ValueEnum; @@ -90,12 +90,14 @@ where source: BoxedAnyIterableVec, compute: ComputeFrom1, ) -> Result { + let full_path = path.join(name); Ok(match mode { Computation::Eager => Self::Eager { - vec: EagerVec::forced_import(path, version, compressed)?, + vec: EagerVec::forced_import(&full_path, version, compressed)?, deps: Dependencies::From1(source, compute), }, Computation::Lazy => { + let _ = fs::remove_dir_all(full_path); Self::LazyFrom1(LazyVecFrom1::init(name, version, source, compute)) } }) @@ -112,12 +114,14 @@ where source2: BoxedAnyIterableVec, compute: ComputeFrom2, ) -> Result { + let full_path = path.join(name); Ok(match mode { Computation::Eager => Self::Eager { - vec: EagerVec::forced_import(path, version, compressed)?, + vec: EagerVec::forced_import(&full_path, version, compressed)?, deps: Dependencies::From2((source1, source2), compute), }, Computation::Lazy => { + let _ = fs::remove_dir_all(full_path); Self::LazyFrom2(LazyVecFrom2::init(name, version, source1, source2, compute)) } }) @@ -135,14 +139,18 @@ where source3: BoxedAnyIterableVec, compute: ComputeFrom3, ) -> Result { + let full_path = path.join(name); Ok(match mode { Computation::Eager => Self::Eager { - vec: EagerVec::forced_import(path, version, compressed)?, + vec: EagerVec::forced_import(&full_path, version, compressed)?, deps: Dependencies::From3((source1, source2, source3), compute), }, - Computation::Lazy => Self::LazyFrom3(LazyVecFrom3::init( - name, version, source1, source2, source3, compute, - )), + Computation::Lazy => { + let _ = fs::remove_dir_all(full_path); + Self::LazyFrom3(LazyVecFrom3::init( + name, version, source1, source2, source3, compute, + )) + } }) }