mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-21 11:56:38 +00:00
refactor: centralize scanner runtime source helpers (#3827)
* refactor: batch lifecycle runtime source handles * refactor: centralize scanner runtime source helpers
This commit is contained in:
@@ -123,6 +123,14 @@ lazy_static! {
|
||||
pub static ref GLOBAL_TransitionState: Arc<TransitionState> = TransitionState::new();
|
||||
}
|
||||
|
||||
pub fn get_global_expiry_state() -> Arc<RwLock<ExpiryState>> {
|
||||
GLOBAL_ExpiryState.clone()
|
||||
}
|
||||
|
||||
pub fn get_global_transition_state() -> Arc<TransitionState> {
|
||||
GLOBAL_TransitionState.clone()
|
||||
}
|
||||
|
||||
fn resolve_transition_worker_count() -> (i64, i64, i64) {
|
||||
let fallback = std::cmp::min(num_cpus::get() as i64, DEFAULT_TRANSITION_WORKERS_CAP);
|
||||
let configured = env::var(ENV_TRANSITION_WORKERS)
|
||||
|
||||
Reference in New Issue
Block a user